diff --git a/api/src/services/uploads/uploads.test.ts b/api/src/services/uploads/uploads.test.ts index ad2fe5c1..fd3f49a9 100644 --- a/api/src/services/uploads/uploads.test.ts +++ b/api/src/services/uploads/uploads.test.ts @@ -137,7 +137,7 @@ describe('uploads', () => { await deleteUpload({ id: scenario.upload.one.id, }) - expect(deleteUploadFile).toHaveBeenCalled() + expect(deleteUploadFile).not.toHaveBeenCalled() }) scenario( diff --git a/api/src/services/uploads/uploads.ts b/api/src/services/uploads/uploads.ts index da430061..cb32e2a1 100644 --- a/api/src/services/uploads/uploads.ts +++ b/api/src/services/uploads/uploads.ts @@ -6,7 +6,7 @@ import type { } from 'types/graphql' import { hasRole } from 'src/lib/auth' -import { s3PutSignedUrl, deleteUploadFile } from 'src/lib/aws' +import { s3PutSignedUrl } from 'src/lib/aws' import aws from 'src/lib/aws' import { ROLES } from 'src/lib/constants' import { db } from 'src/lib/db' @@ -95,7 +95,9 @@ export const deleteUpload: MutationResolvers['deleteUpload'] = ({ id }) => { if (!upload) { throw new ValidationError(`Upload with id ${id} not found`) } - deleteUploadFile(upload) + // TODO: fix aws permissions issue on ECS instance. For now, we'll just log the delete + // deleteUploadFile(upload) + logger.info({ upload_id: id }, 'deleted database record for upload') // 2. delete the upload return db.upload.delete({