Skip to content

Commit

Permalink
Remove API key auth mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Feb 23, 2024
1 parent 66ecf9d commit 50fa833
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/src/server/routes/v2/project-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
200: z.void()
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY]),
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
await server.services.project.upgradeProject({
actorId: req.permission.id,
Expand All @@ -113,7 +113,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
})
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY]),
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
const status = await server.services.project.getProjectUpgradeStatus({
projectId: req.params.projectId,
Expand Down Expand Up @@ -146,7 +146,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
})
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const project = await server.services.project.createProject({
actorId: req.permission.id,
Expand All @@ -172,7 +172,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
200: ProjectsSchema
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),

handler: async (req) => {
const project = await server.services.project.deleteProject({
Expand All @@ -199,7 +199,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
200: projectWithEnv
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const project = await server.services.project.getAProject({
filter: req.params.slug,
Expand Down Expand Up @@ -230,7 +230,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
}
},

onRequest: verifyAuth([AuthMode.JWT, AuthMode.API_KEY, AuthMode.IDENTITY_ACCESS_TOKEN]),
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const project = await server.services.project.updateProject({
filterType: ProjectFilterType.SLUG,
Expand Down

0 comments on commit 50fa833

Please sign in to comment.