fix(striker-ui-api): omit deleted file records in file GET endpoints

main
Tsu-ba-me 3 years ago
parent 462ec6d903
commit c767daa9c4
  1. 3
      striker-ui-api/lib/request_handlers/files/getFileDetail.js
  2. 3
      striker-ui-api/lib/request_handlers/files/getFilesOverview.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;

@ -7,6 +7,7 @@ SELECT
file_size,
file_type,
file_md5sum
FROM files;`);
FROM files
WHERE file_type != 'DELETED';`);
module.exports = getFilesOverview;

Loading…
Cancel
Save