1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: swagger /api/api duplication

Resolves #289
This commit is contained in:
Steven Tang
2022-01-02 11:22:58 +11:00
parent aaa907a7b2
commit 9950da3e7e
14 changed files with 722 additions and 706 deletions

View File

@ -2,9 +2,10 @@ package api
import (
"fmt"
"net/http"
"github.com/gorilla/mux"
"gorm.io/gorm"
"net/http"
)
type HealthApiHandler struct {
@ -25,7 +26,7 @@ func (h *HealthApiHandler) RegisterRoutes(router *mux.Router) {
// @Tags misc
// @Produce plain
// @Success 200 {string} string
// @Router /api/health [get]
// @Router /health [get]
func (h *HealthApiHandler) Get(w http.ResponseWriter, r *http.Request) {
var dbStatus int
if sqlDb, err := h.db.DB(); err == nil {