From 2dc0fd3835203bc3ef4bb5517766e1b6cf0a1173 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Mon, 16 Oct 2023 05:01:58 -0400 Subject: [PATCH] fix(striker-ui-api): sort files by name --- .../src/lib/request_handlers/file/buildQueryFileDetail.ts | 3 ++- striker-ui-api/src/lib/request_handlers/file/getFile.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/striker-ui-api/src/lib/request_handlers/file/buildQueryFileDetail.ts b/striker-ui-api/src/lib/request_handlers/file/buildQueryFileDetail.ts index e69bc04f..c63d8aa3 100644 --- a/striker-ui-api/src/lib/request_handlers/file/buildQueryFileDetail.ts +++ b/striker-ui-api/src/lib/request_handlers/file/buildQueryFileDetail.ts @@ -46,5 +46,6 @@ export const buildQueryFileDetail = ({ JOIN hosts AS hos ON fil_loc.file_location_host_uuid = hos.host_uuid WHERE fil.file_type != '${DELETED}' - ${condFileUUIDs};`; + ${condFileUUIDs} + ORDER BY fil.file_name ASC;`; }; diff --git a/striker-ui-api/src/lib/request_handlers/file/getFile.ts b/striker-ui-api/src/lib/request_handlers/file/getFile.ts index f8876ea9..831f61f1 100644 --- a/striker-ui-api/src/lib/request_handlers/file/getFile.ts +++ b/striker-ui-api/src/lib/request_handlers/file/getFile.ts @@ -17,7 +17,8 @@ export const getFile: RequestHandler = buildGetRequestHandler((request) => { file_type, file_md5sum FROM files - WHERE file_type != '${DELETED}';`; + WHERE file_type != '${DELETED}' + ORDER BY file_name ASC;`; if (fileUUIDs) { query = buildQueryFileDetail({