feat(api): add PATCH /users/@me/fields, finish POST /auth/discord/callback

This commit is contained in:
Sam 2022-05-17 22:35:26 +02:00
parent 020ac15a00
commit 52a03b4aa6
9 changed files with 261 additions and 17 deletions

View file

@ -13,8 +13,11 @@ func Mount(srv *server.Server, r chi.Router) {
s := &Server{srv}
r.Route("/users", func(r chi.Router) {
r.With(server.MustAuth).Get("/@me", server.WrapHandler(s.getMeUser))
r.Get("/{userRef}", server.WrapHandler(s.getUser))
r.With(server.MustAuth).Group(func(r chi.Router) {
r.Get("/@me", server.WrapHandler(s.getMeUser))
r.Patch("/@me/fields", server.WrapHandler(s.patchUserFields))
})
})
}