Skip to content

Commit

Permalink
fix: 🐛 disable openapi.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gracefullight committed Mar 16, 2024
1 parent c17ccfc commit eda1a0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/web/public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions apps/web/src/app/api/openapi.json/route.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import type { NextRequest } from "next/server";

import { NextResponse } from "next/server";
import { openApiDocument } from "~/server/openapi";

// Respond with our OpenAPI schema
// import { NextResponse } from "next/server";
// import { openApiDocument } from "~/server/openapi";

// // Respond with our OpenAPI schema
// const handler = (_: NextRequest) => {
// // ? https://nextjs.org/docs/app/api-reference/functions/next-response#json
// return NextResponse.json(openApiDocument);
// };

const handler = (_: NextRequest) => {
// ? https://nextjs.org/docs/app/api-reference/functions/next-response#json
return NextResponse.json(openApiDocument);
return NextResponse.json({});
};

export { handler as GET };

0 comments on commit eda1a0a

Please sign in to comment.