format fix
This commit is contained in:
1 parent
f061457d7f
commit
d34a8474fc
35 files changed
+466
-294
No files matched your search
@@ -15,7 +15,7 @@ type NextCtx = { params: Promise<{ slug?: string[] }> }
|
||||
type PayloadCtx = { params: Promise<{ slug: string[] }> }
|
||||
|
||||
const coerceCtx = (ctx: NextCtx): PayloadCtx => ({
|
||||
params: ctx.params.then(p => ({ slug: p?.slug ?? [] })),
|
||||
params: ctx.params.then((p) => ({ slug: p?.slug ?? [] })),
|
||||
})
|
||||
|
||||
export function GET(req: Request, ctx: NextCtx) {
|
||||
@@ -40,4 +40,4 @@ export function PUT(req: Request, ctx: NextCtx) {
|
||||
|
||||
export function OPTIONS(req: Request, ctx: NextCtx) {
|
||||
return REST_OPTIONS(config)(req, coerceCtx(ctx))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user