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

@ -1,6 +1,9 @@
package v1
import (
"net/http"
"strings"
"github.com/gorilla/mux"
conf "github.com/muety/wakapi/config"
"github.com/muety/wakapi/middlewares"
@ -9,8 +12,6 @@ import (
routeutils "github.com/muety/wakapi/routes/utils"
"github.com/muety/wakapi/services"
"github.com/muety/wakapi/utils"
"net/http"
"strings"
)
type ProjectsHandler struct {
@ -44,7 +45,7 @@ func (h *ProjectsHandler) RegisterRoutes(router *mux.Router) {
// @Param q query string true "Query to filter projects by"
// @Security ApiKeyAuth
// @Success 200 {object} v1.ProjectsViewModel
// @Router /api/compat/wakatime/v1/users/{user}/projects [get]
// @Router /compat/wakatime/v1/users/{user}/projects [get]
func (h *ProjectsHandler) Get(w http.ResponseWriter, r *http.Request) {
user, err := routeutils.CheckEffectiveUser(w, r, h.userSrvc, "current")
if err != nil {