add frontend template + GET /users/{userRef} route
This commit is contained in:
parent
5a75f99720
commit
580449440a
28 changed files with 1393 additions and 12 deletions
20
backend/routes/user/routes.go
Normal file
20
backend/routes/user/routes.go
Normal 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))
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue