This commit is contained in:
seb
2026-09-29 11:21:55 +02:00
parent 3089cc7252
commit cf4af1480b
7 changed files with 173 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import { authMiddleware } from './middleware/auth.js';
import { ensureConnection } from '../db/store.js';
import { closeAll as closeAllSse } from './sse.js';
import { getOrCreateCert } from '../util/cert.js';
import v1Router from '../v1/index.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -85,6 +86,8 @@ async function createApi() {
}
await loadRoutes(app, '/api');
app.use('/v1', v1Router);
app.use('/api/v1', v1Router);
app.use((err, _req, res, next) => {
if (err.type === 'entity.too.large') {