| 1372 | } |
| 1373 | |
| 1374 | function _shouldConditionallyDelete(request, locations) { |
| 1375 | if (locations.length === 0) { |
| 1376 | return false; |
| 1377 | } |
| 1378 | const storageClass = request.headers['x-scal-storage-class']; |
| 1379 | const type = storageClass && locationConstraints[storageClass] && locationConstraints[storageClass].type; |
| 1380 | const isExternalBackend = type && constants.externalBackends[type]; |
| 1381 | const isNotVersioned = !locations[0].dataStoreVersionId; |
| 1382 | return isExternalBackend && isNotVersioned; |
| 1383 | } |
| 1384 | |
| 1385 | function batchDelete(request, response, userInfo, log, callback) { |
| 1386 | return _getRequestPayload(request, (err, payload) => { |