comparison OrthancServer/Sources/ServerContext.cpp @ 4694:da1edb7d6332

"/tools/bulk-delete" to delete a group of multiple, unrelated resources at once
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Jun 2021 17:37:47 +0200
parents 521e39b3f2c0
children f0038043fb97 2f35e6b765e5
comparison
equal deleted inserted replaced
4693:45bce660ce3a 4694:da1edb7d6332
1186 return true; 1186 return true;
1187 } 1187 }
1188 } 1188 }
1189 1189
1190 1190
1191 bool ServerContext::DeleteResource(Json::Value& target, 1191 bool ServerContext::DeleteResource(Json::Value& remainingAncestor,
1192 const std::string& uuid, 1192 const std::string& uuid,
1193 ResourceType expectedType) 1193 ResourceType expectedType)
1194 { 1194 {
1195 if (expectedType == ResourceType_Instance) 1195 if (expectedType == ResourceType_Instance)
1196 { 1196 {
1197 // remove the file from the DicomCache 1197 // remove the file from the DicomCache
1198 dicomCache_.Invalidate(uuid); 1198 dicomCache_.Invalidate(uuid);
1199 PublishDicomCacheMetrics(); 1199 PublishDicomCacheMetrics();
1200 } 1200 }
1201 1201
1202 return index_.DeleteResource(target, uuid, expectedType); 1202 return index_.DeleteResource(remainingAncestor, uuid, expectedType);
1203 } 1203 }
1204 1204
1205 1205
1206 void ServerContext::SignalChange(const ServerIndexChange& change) 1206 void ServerContext::SignalChange(const ServerIndexChange& change)
1207 { 1207 {