2022-05-02 08:19:37 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
|
|
"gitlab.com/1f320/pronouns/backend/routes/auth"
|
2022-05-04 07:27:16 -07:00
|
|
|
"gitlab.com/1f320/pronouns/backend/routes/user"
|
2022-05-02 08:19:37 -07:00
|
|
|
"gitlab.com/1f320/pronouns/backend/server"
|
|
|
|
)
|
|
|
|
|
|
|
|
// mountRoutes mounts all API routes on the server's router.
|
|
|
|
// they are all mounted under /v1/
|
|
|
|
func mountRoutes(s *server.Server) {
|
2022-05-04 07:27:16 -07:00
|
|
|
// future-proofing for API versions
|
2022-05-02 08:19:37 -07:00
|
|
|
s.Router.Route("/v1", func(r chi.Router) {
|
|
|
|
auth.Mount(s, r)
|
2022-05-04 07:27:16 -07:00
|
|
|
user.Mount(s, r)
|
2022-05-02 08:19:37 -07:00
|
|
|
})
|
|
|
|
}
|