chore(backend): change swagger endpoint from /swagger to /docs
This commit is contained in:
parent
803d371b59
commit
41862b3d5c
1 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ func New(cfg config.Config) (*Server, error) {
|
|||
}
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
response := `{"message":"💊 SaveInMed API is running!","docs":"/swagger/index.html","health":"/health","version":"1.0.0"}`
|
||||
response := `{"message":"💊 SaveInMed API is running!","docs":"/docs","health":"/health","version":"1.0.0"}`
|
||||
_, _ = w.Write([]byte(response))
|
||||
})
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ func New(cfg config.Config) (*Server, error) {
|
|||
mux.Handle("PUT /api/v1/shipping/settings/{vendor_id}", chain(http.HandlerFunc(h.UpsertShippingSettings), middleware.Logger, middleware.Gzip, auth))
|
||||
mux.Handle("POST /api/v1/shipping/calculate", chain(http.HandlerFunc(h.CalculateShipping), middleware.Logger, middleware.Gzip))
|
||||
|
||||
mux.Handle("GET /swagger/", httpSwagger.Handler(httpSwagger.URL("/swagger/doc.json")))
|
||||
mux.Handle("GET /docs/", httpSwagger.Handler(httpSwagger.URL("/docs/doc.json")))
|
||||
|
||||
return &Server{cfg: cfg, db: db, mux: mux, svc: svc}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue