Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c20720f120 |
@@ -139,7 +139,9 @@ API runs on `http://localhost:8080`
|
|||||||
|
|
||||||
## API Documentation
|
## API Documentation
|
||||||
|
|
||||||
Access the interactive Swagger UI at `http://localhost:8080/api/v1/docs`
|
**Live:** [apocapoc.app/api/v1/docs](https://apocapoc.app/api/v1/docs)
|
||||||
|
|
||||||
|
**Local:** `http://localhost:8080/api/v1/docs`
|
||||||
|
|
||||||
Includes endpoint reference, schemas, authentication examples, and live testing.
|
Includes endpoint reference, schemas, authentication examples, and live testing.
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ func NewRouter(appURL string, habitHandlers *HabitHandlers, authHandlers *AuthHa
|
|||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
r.Get("/docs", httpSwagger.Handler(
|
|
||||||
httpSwagger.URL("/api/v1/docs/doc.json"),
|
|
||||||
))
|
|
||||||
r.Get("/api/v1/docs", func(w http.ResponseWriter, r *http.Request) {
|
r.Get("/api/v1/docs", func(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Redirect(w, r, "/api/v1/docs/index.html", http.StatusMovedPermanently)
|
http.Redirect(w, r, "/api/v1/docs/index.html", http.StatusMovedPermanently)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user