Skip to content

Commit

Permalink
Rename profile routes to be consistent w/ existing ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
lostlevels committed Mar 17, 2024
1 parent 73cb026 commit 7d32881
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth/service/api/v1/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (

func (r *Router) ProfileRoutes() []*rest.Route {
return []*rest.Route{
rest.Get("/v1/profiles/:userId", api.RequireUser(r.GetProfile)),
rest.Get("/v1/users/:userId/profile", api.RequireUser(r.GetProfile)),
// The following modification routes required custodian access in seagull, but I'm not sure that's quite right - it seems it should be if the user can modify the userId.
rest.Put("/v1/profiles/:userId", r.requireWriteAccess("userId", r.UpdateProfile)),
rest.Delete("/v1/profiles/:userId", r.requireWriteAccess("userId", r.DeleteProfile)),
rest.Put("/v1/users/:userId/profile", r.requireWriteAccess("userId", r.UpdateProfile)),
rest.Delete("/v1/users/:userId/profile", r.requireWriteAccess("userId", r.DeleteProfile)),
}
}

Expand Down

0 comments on commit 7d32881

Please sign in to comment.