feat(WEB-132): add middlewares, support for seamless login and improve lang based routes
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
export function badRequest() {
|
||||
return new NextResponse("Bad request", {
|
||||
status: 400,
|
||||
})
|
||||
}
|
||||
|
||||
export function internalServerError() {
|
||||
return new NextResponse("Internal Server Error", {
|
||||
status: 500,
|
||||
})
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { badRequestError, internalServerError } from "@/server/errors"
|
||||
import { badRequestError, internalServerError } from "@/server/errors/trpc"
|
||||
import { protectedProcedure, router } from "@/server/trpc"
|
||||
import { getUserSchema } from "./output"
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { initTRPC } from "@trpc/server"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
import { transformer } from "./transformer"
|
||||
import { unauthorizedError } from "./errors"
|
||||
import { unauthorizedError } from "./errors/trpc"
|
||||
|
||||
import type { Context } from "./context"
|
||||
import type { Meta } from "@/types/trpc/meta"
|
||||
|
||||
Reference in New Issue
Block a user