MCPcopy Index your code
hub / github.com/scality/cloudserver / _performConditionalDelete

Function _performConditionalDelete

lib/routes/routeBackbeat.js:1356–1372  ·  view source on GitHub ↗
(request, response, locations, log, cb)

Source from the content-addressed store, hash-verified

1354}
1355
1356function _performConditionalDelete(request, response, locations, log, cb) {
1357 const { headers } = request;
1358 const location = locationConstraints[headers['x-scal-storage-class']];
1359 if (!request.headers['if-unmodified-since']) {
1360 log.debug('unknown last modified time, skipping conditional delete', {
1361 method: '_performConditionalDelete',
1362 });
1363 return _respond(response, null, log, cb);
1364 }
1365 // Azure supports a conditional delete operation.
1366 if (location && location.type === 'azure') {
1367 return _azureConditionalDelete(request, response, log, cb);
1368 }
1369 // Other clouds do not support a conditional delete. Instead, we
1370 // conditionally put tags to indicate if it should be deleted by the user.
1371 return _conditionalTagging(request, response, locations, log, cb);
1372}
1373
1374function _shouldConditionallyDelete(request, locations) {
1375 if (locations.length === 0) {

Callers 1

batchDeleteFunction · 0.85

Calls 4

_respondFunction · 0.85
_azureConditionalDeleteFunction · 0.85
_conditionalTaggingFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected