add frontend template + GET /users/{userRef} route

This commit is contained in:
Sam 2022-05-04 16:27:16 +02:00
parent 5a75f99720
commit 580449440a
28 changed files with 1393 additions and 12 deletions

View file

@ -0,0 +1,20 @@
package user
import (
"github.com/go-chi/chi/v5"
"gitlab.com/1f320/pronouns/backend/server"
)
type Server struct {
*server.Server
}
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(nil))
r.Get("/{userRef}", server.WrapHandler(s.getUser))
})
}