Skip to content

Commit

Permalink
fix(server): swap order for auth to avoid nemspace conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Nov 3, 2022
1 parent 3d7354f commit a4b68c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ app.use("/v1/sites/:siteName", authenticatedSitesSubrouterV1)
app.use("/v1", authenticatedSubrouterV1)

app.use("/v2/auth", authV2Router.getRouter())
// Endpoints which have siteName, used to inject site access token
app.use("/v2/sites/:siteName", authenticatedSitesSubrouterV2)
// Endpoints which have require login, but not site access token
app.use("/v2", authenticatedSubrouterV2)
// Endpoints which have siteName, used to inject site access token
app.use("/v2/sites/:siteName", authenticatedSitesSubrouterV2)

// FormSG Backend handler routes
app.use("/formsg", formsgRouter.getRouter())
Expand Down

0 comments on commit a4b68c3

Please sign in to comment.