2022-05-02 17:19:37 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2022-05-14 16:52:08 +02:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/auth"
|
2022-06-17 15:49:16 +02:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/bot"
|
2022-09-20 13:02:48 +02:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/member"
|
2023-03-08 14:13:04 +01:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/meta"
|
2022-05-14 16:52:08 +02:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/user"
|
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/server"
|
2022-05-02 17:19:37 +02: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) {
|
2022-05-04 16:27:16 +02:00
|
|
|
// future-proofing for API versions
|
2022-05-02 17:19:37 +02:00
|
|
|
s.Router.Route("/v1", func(r chi.Router) {
|
|
|
|
auth.Mount(s, r)
|
2022-05-04 16:27:16 +02:00
|
|
|
user.Mount(s, r)
|
2022-09-20 13:02:48 +02:00
|
|
|
member.Mount(s, r)
|
2022-06-17 15:49:16 +02:00
|
|
|
bot.Mount(s, r)
|
2023-03-08 14:13:04 +01:00
|
|
|
meta.Mount(s, r)
|
2022-05-02 17:19:37 +02:00
|
|
|
})
|
|
|
|
}
|