diff --git a/server/package.json b/server/package.json index c31dbee..b8033b0 100644 --- a/server/package.json +++ b/server/package.json @@ -19,7 +19,6 @@ "devDependencies": { "@biomejs/biome": "2.2.0", "@tsconfig/strictest": "^2.0.5", - "@types/cookie-parser": "^1.4.9", "@types/express": "^5.0.3", "@types/express-session": "^1.18.0", "@types/jest": "^30.0.0", @@ -33,7 +32,6 @@ "dependencies": { "arctic": "^3.7.0", "axios": "^1.7.9", - "cookie-parser": "^1.4.7", "express": "^5.1.0", "express-session": "^1.18.0", "openapi-backend": "^5.15.0", diff --git a/server/pnpm-lock.yaml b/server/pnpm-lock.yaml index 609690f..9c3b229 100644 --- a/server/pnpm-lock.yaml +++ b/server/pnpm-lock.yaml @@ -14,9 +14,6 @@ importers: axios: specifier: ^1.7.9 version: 1.11.0 - cookie-parser: - specifier: ^1.4.7 - version: 1.4.7 express: specifier: ^5.1.0 version: 5.1.0 @@ -39,9 +36,6 @@ importers: '@tsconfig/strictest': specifier: ^2.0.5 version: 2.0.5 - '@types/cookie-parser': - specifier: ^1.4.9 - version: 1.4.9(@types/express@5.0.3) '@types/express': specifier: ^5.0.3 version: 5.0.3 @@ -635,11 +629,6 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - '@types/cookie-parser@1.4.9': - resolution: {integrity: sha512-tGZiZ2Gtc4m3wIdLkZ8mkj1T6CEHb35+VApbL2T14Dew8HA7c+04dmKqsKRNC+8RJPm16JEK0tFSwdZqubfc4g==} - peerDependencies: - '@types/express': '*' - '@types/express-serve-static-core@5.0.7': resolution: {integrity: sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==} @@ -991,13 +980,6 @@ packages: convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cookie-parser@1.4.7: - resolution: {integrity: sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==} - engines: {node: '>= 0.8.0'} - - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - cookie-signature@1.0.7: resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} @@ -2757,10 +2739,6 @@ snapshots: dependencies: '@types/node': 24.3.0 - '@types/cookie-parser@1.4.9(@types/express@5.0.3)': - dependencies: - '@types/express': 5.0.3 - '@types/express-serve-static-core@5.0.7': dependencies: '@types/node': 24.3.0 @@ -3115,13 +3093,6 @@ snapshots: convert-source-map@2.0.0: {} - cookie-parser@1.4.7: - dependencies: - cookie: 0.7.2 - cookie-signature: 1.0.6 - - cookie-signature@1.0.6: {} - cookie-signature@1.0.7: {} cookie-signature@1.2.2: {} diff --git a/server/src/server.ts b/server/src/server.ts index 37f0243..47d50cb 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -55,6 +55,10 @@ api.register({ return res.status(500).json({ error: "Failed to list repositories" }); } }, + + notFound: (_c, _req, res) => res.status(404).json({ err: "not found" }), + validationFail: (c, _req, res) => + res.status(400).json({ err: c.validation.errors }), }); api.init();