mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add Swagger/OpenAPI documentation at /api/docs
Registers @fastify/swagger and @fastify/swagger-ui, adds /api/docs to public auth paths, and wires up static serving + cleanup cron in index.ts.
This commit is contained in:
@@ -176,7 +176,7 @@ function extractToken(request: FastifyRequest): string | null {
|
||||
|
||||
// ── Auth middleware ────────────────────────────────────────────────
|
||||
|
||||
const PUBLIC_PATHS = ["/api/v1/health", "/api/auth/"];
|
||||
const PUBLIC_PATHS = ["/api/v1/health", "/api/auth/", "/api/docs"];
|
||||
|
||||
function isPublicRoute(url: string): boolean {
|
||||
return PUBLIC_PATHS.some((path) => url.startsWith(path));
|
||||
|
||||
Reference in New Issue
Block a user