mirror of
https://codeberg.org/pronounscc/pronouns.cc.git
synced 2024-11-20 14:29:52 +01:00
20 lines
544 B
Go
20 lines
544 B
Go
package main
|
|
|
|
import (
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/auth"
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/bot"
|
|
"codeberg.org/u1f320/pronouns.cc/backend/routes/user"
|
|
"codeberg.org/u1f320/pronouns.cc/backend/server"
|
|
"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
|
|
s.Router.Route("/v1", func(r chi.Router) {
|
|
auth.Mount(s, r)
|
|
user.Mount(s, r)
|
|
bot.Mount(s, r)
|
|
})
|
|
}
|