pull/28617/merge
Alex Logashov 2026-06-03 13:13:24 -04:00 committed by GitHub
commit 20e4fc0020
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,11 @@ export class ViewService extends BaseService {
async getAssetsByOriginalPath(auth: AuthDto, path: string): Promise<AssetResponseDto[]> {
const assets = await this.viewRepository.getAssetsByOriginalPath(auth.user.id, path);
return assets.map((asset) => mapAsset(asset, { auth }));
const nsCollator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' });
return assets.map((asset) => mapAsset(asset, { auth })).sort(({ originalFileName: name1 }, { originalFileName: name2 }) =>
nsCollator.compare(name1, name2),
);
}
}