diff --git a/services/api/handler.ts b/services/api/handler.ts index 4092a76..0c3d720 100644 --- a/services/api/handler.ts +++ b/services/api/handler.ts @@ -97,11 +97,12 @@ const handlePlatformAPI: PlatformAPIHandler = ( config ); - if (result.success === false) + if (result.success === false) { return res.status(result.status).json({ message: result.error }); + } res.setHeader("Content-Type", result.contentType || "image/svg+xml"); - return res.status(result.status).send(result.data); + return res.status(200).send(result.data); }; }; diff --git a/tsconfig.json b/tsconfig.json index a4dac8d..ae847a3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -21,7 +25,9 @@ ], "baseUrl": ".", "paths": { - "@/*": ["*"] + "@/*": [ + "*" + ] } }, "include": [ @@ -33,14 +39,17 @@ "pages/api/github", "services/prisma/schema.prisma", ".lintstagedrc.js", - ".next/types/**/*.ts", - "/Users/samet/Documents/GitHub/devstats/.next/types/**/*.ts" + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" ], - "exclude": ["node_modules"], "ts-node": { "compilerOptions": { "module": "commonjs" }, - "typeRoots": ["./node_modules/@types"] + "typeRoots": [ + "./node_modules/@types" + ] } -} +} \ No newline at end of file