refactor: maintenanceStatus -> getMaintenanceStatus

refactor: `integrityCheck` -> `detectPriorInstall`
chore: add `v2.4.0` version
refactor: `/backups/list` -> `/backups`
refactor: use sendFile in download route
refactor: use separate backups permissions
chore: correct descriptions
refactor: permit handler that doesn't return promise for sendfile
This commit is contained in:
izzy
2025-12-02 16:47:31 +00:00
parent b5ff460a55
commit 94af1bba4d
16 changed files with 179 additions and 137 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ const cacheControlHeaders: Record<CacheControl, string | null> = {
export const sendFile = async (
res: Response,
next: NextFunction,
handler: () => Promise<ImmichFileResponse>,
handler: () => Promise<ImmichFileResponse> | ImmichFileResponse,
logger: LoggingRepository,
): Promise<void> => {
// promisified version of 'res.sendFile' for cleaner async handling
+3 -1
View File
@@ -77,7 +77,9 @@ export function generateMaintenanceSecret(): string {
return randomBytes(64).toString('hex');
}
export async function integrityCheck(storageRepository: StorageRepository): Promise<MaintenanceIntegrityResponseDto> {
export async function detectPriorInstall(
storageRepository: StorageRepository,
): Promise<MaintenanceIntegrityResponseDto> {
return {
storage: await Promise.all(
Object.values(StorageFolder).map(async (folder) => {