Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async move(g, destinations, distEndpoint) {
log.info(`granules.move ${g.granuleId}`);
const files = clonedeep(g.files);
await moveGranuleFiles(g.granuleId, files, destinations, distEndpoint, g.published);
await this.update({ granuleId: g.granuleId }, { files: files });
}
async move(g, destinations, distEndpoint) {
log.info(`granules.move ${g.granuleId}`);
const updatedFiles = await moveGranuleFiles(g.files, destinations);
await cmrjs.reconcileCMRMetadata({
granuleId: g.granuleId,
updatedFiles,
distEndpoint,
published: g.published
});
return this.update(
{ granuleId: g.granuleId },
{
files: updatedFiles.map(partial(renameProperty, 'name', 'fileName'))
}
);
}