Skip to content

Commit

Permalink
fixes an issue where /users/current wasnt matching correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
talentedmrjones committed Sep 6, 2024
1 parent c19a52c commit fcc36a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/cmd/api/internal/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func Handler() http.Handler {

router.HandleFunc("/api/v1/users", controller.ListUsers).Methods("GET")
router.HandleFunc("/api/v1/users", controller.SaveUser).Methods("POST")
router.HandleFunc("/api/v1/users/{userid:[a-zA-Z0-9\\-]+}", controller.GetUserById).Methods("GET")
router.HandleFunc("/api/v1/users/current", controller.GetCurrentUser).Methods("GET")
router.HandleFunc("/api/v1/users/{userid:[a-zA-Z0-9\\-]+}", controller.SaveUser).Methods("PUT")
router.HandleFunc("/api/v1/users/{userid:[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+}", controller.GetUserById).Methods("GET")
router.HandleFunc("/api/v1/users/{userid:[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+}", controller.SaveUser).Methods("PUT")

router.HandleFunc("/api/v1/scores", controller.ListScores).Methods("GET")
router.HandleFunc("/api/v1/scores/aggregate", controller.GetScoresAggregate).Methods("GET") // yes "aggregate" is a noun
Expand Down

0 comments on commit fcc36a9

Please sign in to comment.