Update service-token-router.ts

This commit is contained in:
Daniel Hougaard
2024-01-17 21:19:48 +04:00
committed by Akhil Mohan
parent 2606e42079
commit 28fdf4ed4b

View File

@@ -16,11 +16,8 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) =>
server.route({
url: "/",
method: "GET",
onRequest: verifyAuth([AuthMode.JWT]),
onRequest: verifyAuth([AuthMode.JWT, AuthMode.SERVICE_TOKEN]),
schema: {
params: z.object({
serviceTokenId: z.string().trim()
}),
response: {
200: sanitizedServiceTokenSchema
}