mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): ♻️ Upgrade zod-openapi to 0.18.3
Needed to add "as const" to all middleware handlers :)
This commit is contained in:
parent
fbfd237f27
commit
621dd7e9d9
74 changed files with 86 additions and 86 deletions
|
|
@ -75,7 +75,7 @@ export default (plugin: PluginType): void =>
|
|||
}),
|
||||
jsonOrForm(),
|
||||
plugin.middleware,
|
||||
],
|
||||
] as const,
|
||||
responses: {
|
||||
302: {
|
||||
description: "Redirect to the application",
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default (plugin: PluginType): void => {
|
|||
required: false,
|
||||
}),
|
||||
plugin.middleware,
|
||||
],
|
||||
] as const,
|
||||
}),
|
||||
async (context) => {
|
||||
const jwk = await exportJWK(
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default (plugin: PluginType): void => {
|
|||
summary: "SSO callback",
|
||||
description:
|
||||
"After the user has authenticated to an external OpenID provider, they are redirected here to complete the OAuth flow and get a code",
|
||||
middleware: [plugin.middleware],
|
||||
middleware: [plugin.middleware] as const,
|
||||
request: {
|
||||
query: schemas.query,
|
||||
params: schemas.param,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export default (plugin: PluginType): void => {
|
|||
request: {
|
||||
query: schemas.query,
|
||||
},
|
||||
middleware: [plugin.middleware],
|
||||
middleware: [plugin.middleware] as const,
|
||||
responses: {
|
||||
302: {
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default (plugin: PluginType): void => {
|
|||
},
|
||||
),
|
||||
plugin.middleware,
|
||||
],
|
||||
] as const,
|
||||
request: {
|
||||
params: z.object({
|
||||
id: z.string(),
|
||||
|
|
@ -124,7 +124,7 @@ export default (plugin: PluginType): void => {
|
|||
},
|
||||
),
|
||||
plugin.middleware,
|
||||
],
|
||||
] as const,
|
||||
request: {
|
||||
params: z.object({
|
||||
id: z.string(),
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default (plugin: PluginType): void => {
|
|||
},
|
||||
),
|
||||
plugin.middleware,
|
||||
],
|
||||
] as const,
|
||||
responses: {
|
||||
200: {
|
||||
description: "Linked accounts",
|
||||
|
|
@ -91,7 +91,7 @@ export default (plugin: PluginType): void => {
|
|||
},
|
||||
),
|
||||
plugin.middleware,
|
||||
],
|
||||
] as const,
|
||||
request: {
|
||||
body: {
|
||||
content: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue