pronounsfu/backend/routes.go

25 lines
696 B
Go
Raw Normal View History

2022-05-02 08:19:37 -07:00
package main
import (
"codeberg.org/u1f320/pronouns.cc/backend/routes/auth"
2022-06-17 06:49:16 -07:00
"codeberg.org/u1f320/pronouns.cc/backend/routes/bot"
"codeberg.org/u1f320/pronouns.cc/backend/routes/member"
"codeberg.org/u1f320/pronouns.cc/backend/routes/meta"
"codeberg.org/u1f320/pronouns.cc/backend/routes/user"
"codeberg.org/u1f320/pronouns.cc/backend/server"
2022-05-02 08:19:37 -07:00
"github.com/go-chi/chi/v5"
)
// mountRoutes mounts all API routes on the server's router.
// they are all mounted under /v1/
func mountRoutes(s *server.Server) {
// 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)
user.Mount(s, r)
member.Mount(s, r)
2022-06-17 06:49:16 -07:00
bot.Mount(s, r)
meta.Mount(s, r)
2022-05-02 08:19:37 -07:00
})
}