From c767daa9c4bcd4102a924ae44c82946dc8bcd551 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 19 Jan 2022 19:01:33 -0500 Subject: [PATCH] fix(striker-ui-api): omit deleted file records in file GET endpoints --- striker-ui-api/lib/request_handlers/files/getFileDetail.js | 3 ++- striker-ui-api/lib/request_handlers/files/getFilesOverview.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/striker-ui-api/lib/request_handlers/files/getFileDetail.js b/striker-ui-api/lib/request_handlers/files/getFileDetail.js index c2828639..5cd9c375 100644 --- a/striker-ui-api/lib/request_handlers/files/getFileDetail.js +++ b/striker-ui-api/lib/request_handlers/files/getFileDetail.js @@ -18,7 +18,8 @@ const getFileDetail = buildGetFiles( ON fil.file_uuid = fil_loc.file_location_file_uuid JOIN anvils AS anv ON fil_loc.file_location_anvil_uuid = anv.anvil_uuid - WHERE fil.file_uuid = '${request.params.fileUUID}';`, + WHERE fil.file_uuid = '${request.params.fileUUID}' + AND fil.file_type != 'DELETED';`, ); module.exports = getFileDetail; diff --git a/striker-ui-api/lib/request_handlers/files/getFilesOverview.js b/striker-ui-api/lib/request_handlers/files/getFilesOverview.js index b249d53f..6f62e541 100644 --- a/striker-ui-api/lib/request_handlers/files/getFilesOverview.js +++ b/striker-ui-api/lib/request_handlers/files/getFilesOverview.js @@ -7,6 +7,7 @@ SELECT file_size, file_type, file_md5sum -FROM files;`); +FROM files +WHERE file_type != 'DELETED';`); module.exports = getFilesOverview;