forked from mirrors/pronouns.cc
remove autogenerated docs, update API docs link
This commit is contained in:
parent
58eff3ef4b
commit
4377d38933
3 changed files with 1 additions and 492 deletions
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,6 @@
|
|||
package backend
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"codeberg.org/pronounscc/pronouns.cc/backend/routes/v1/auth"
|
||||
"codeberg.org/pronounscc/pronouns.cc/backend/routes/v1/bot"
|
||||
"codeberg.org/pronounscc/pronouns.cc/backend/routes/v1/member"
|
||||
|
@ -12,14 +10,10 @@ import (
|
|||
user2 "codeberg.org/pronounscc/pronouns.cc/backend/routes/v2/user"
|
||||
"codeberg.org/pronounscc/pronouns.cc/backend/server"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/render"
|
||||
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed openapi.html
|
||||
var openapi string
|
||||
|
||||
// mountRoutes mounts all API routes on the server's router.
|
||||
// they are all mounted under /v1/
|
||||
func mountRoutes(s *server.Server) {
|
||||
|
@ -35,9 +29,4 @@ func mountRoutes(s *server.Server) {
|
|||
s.Router.Route("/v2", func(r chi.Router) {
|
||||
user2.Mount(s, r)
|
||||
})
|
||||
|
||||
// API docs
|
||||
s.Router.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
render.HTML(w, r, openapi)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<ButtonGroup>
|
||||
<Button color="success" on:click={() => createToken(false)}>New API token</Button>
|
||||
<Button color="success" on:click={() => createToken(true)}>New read-only API token</Button>
|
||||
<Button color="secondary" href="/api" target="_blank">API docs</Button>
|
||||
<Button color="secondary" href="https://docs.pronouns.cc/api/" target="_blank">API docs</Button>
|
||||
</ButtonGroup>
|
||||
</h1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue