mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(api): add user files CRUD routes at /api/v1/files/*
Implements all 7 routes for the persistent file library: list with pagination/search, upload (multi-file), details with recursive version chain CTE, download stream, on-the-fly Sharp thumbnail, bulk delete of entire version chains, and save-result for tool output versioning. Registered in index.ts after fileRoutes.
This commit is contained in:
@@ -15,6 +15,7 @@ import { registerPipelineRoutes } from "./routes/pipeline.js";
|
||||
import { registerProgressRoutes } from "./routes/progress.js";
|
||||
import { apiKeyRoutes } from "./routes/api-keys.js";
|
||||
import { settingsRoutes } from "./routes/settings.js";
|
||||
import { userFileRoutes } from "./routes/user-files.js";
|
||||
import { db, schema } from "./db/index.js";
|
||||
|
||||
// Run before anything else
|
||||
@@ -69,6 +70,9 @@ await authRoutes(app);
|
||||
// File upload/download routes
|
||||
await fileRoutes(app);
|
||||
|
||||
// User file library routes (persistent file management with versioning)
|
||||
await userFileRoutes(app);
|
||||
|
||||
// Tool routes (generic factory-based)
|
||||
await registerToolRoutes(app);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user