diff --git a/src/routes/pages.ts b/src/routes/pages.ts index 518bfed..53d8f76 100644 --- a/src/routes/pages.ts +++ b/src/routes/pages.ts @@ -7,7 +7,7 @@ import type { Config } from '../config.ts'; import type { Logger } from '../middleware/logging.ts'; import type { JwtPayload } from '../types.ts'; import type { LockoutService } from '../services/lockout.ts'; -import { createFile, getFileById, getFilesByUserId, deleteFile, type FileRow } from '../db/files.ts'; +import { createFile, getFileById, getFilesByUserId, deleteFile } from '../db/files.ts'; import { saveFile, deleteStoredFile, getFilePath } from '../services/storage.ts'; import { attemptLogin } from '../services/login-handler.ts'; import { makeRequireAuth, issueSessionCookie } from '../middleware/auth.ts'; @@ -148,7 +148,7 @@ export const pageRoutes: FastifyPluginAsync<{ deps: Deps }> = async (app, { deps app.get('/files', { preHandler: requireAuth }, async (request, reply) => { const { sub: userId } = request.user as JwtPayload; const files = getFilesByUserId(db, userId); - const filesWithSize = files.map((f: FileRow) => ({ ...f, sizeFormatted: formatBytes(f.size) })); + const filesWithSize = files.map((f) => ({ ...f, sizeFormatted: formatBytes(f.size) })); return reply.view('file-list.ejs', { title: 'My files', authed: true, files: filesWithSize, baseUrl: config.baseUrl }); });