lint :(
This commit is contained in:
parent
c347e163ff
commit
38b777602e
3 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import { createOpenApiNextHandler } from "trpc-openapi";
|
||||
import cors from "nextjs-cors";
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { createTRPCContext } from "~/server/api/trpc";
|
|||
|
||||
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
// Setup CORS
|
||||
cors(req, res);
|
||||
await cors(req, res);
|
||||
|
||||
// Handle incoming OpenAPI requests
|
||||
return createOpenApiNextHandler({
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import { openApiDocument } from '../../server/openapi';
|
||||
import { openApiDocument } from "../../server/openapi";
|
||||
|
||||
// Respond with our OpenAPI schema
|
||||
const handler = (req: NextApiRequest, res: NextApiResponse) => {
|
||||
res.status(200).send(openApiDocument);
|
||||
};
|
||||
|
||||
export default handler;
|
||||
export default handler;
|
||||
|
|
|
@ -67,7 +67,7 @@ export const createTRPCContext = async (opts: CreateNextContextOptions) => {
|
|||
* This is where the tRPC API is initialized, connecting the context and transformer.
|
||||
*/
|
||||
import { initTRPC, TRPCError } from "@trpc/server";
|
||||
import { OpenApiMeta } from "trpc-openapi";
|
||||
import type { OpenApiMeta } from "trpc-openapi";
|
||||
import { Ratelimit } from "@upstash/ratelimit";
|
||||
import superjson from "superjson";
|
||||
import { env } from "~/env.mjs";
|
||||
|
|
Loading…
Add table
Reference in a new issue