fix(server): folder sort order (#21383)

This commit is contained in:
Sergey Katsubo 2025-08-29 03:22:40 +03:00 committed by GitHub
parent b6223af5ca
commit 460e1d4715
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -12,6 +12,8 @@ where
and "fileCreatedAt" is not null and "fileCreatedAt" is not null
and "fileModifiedAt" is not null and "fileModifiedAt" is not null
and "localDateTime" is not null and "localDateTime" is not null
order by
"directoryPath" asc
-- ViewRepository.getAssetsByOriginalPath -- ViewRepository.getAssetsByOriginalPath
select select

View file

@ -20,6 +20,7 @@ export class ViewRepository {
.where('fileCreatedAt', 'is not', null) .where('fileCreatedAt', 'is not', null)
.where('fileModifiedAt', 'is not', null) .where('fileModifiedAt', 'is not', null)
.where('localDateTime', 'is not', null) .where('localDateTime', 'is not', null)
.orderBy('directoryPath', 'asc')
.execute(); .execute();
return results.map((row) => row.directoryPath.replaceAll(/\/$/g, '')); return results.map((row) => row.directoryPath.replaceAll(/\/$/g, ''));