fix(internal): 删除cateage部分,修复repo和service部分
This commit is contained in:
@@ -18,7 +18,6 @@ func RegisterRouter(r *gin.Engine) {
|
||||
{
|
||||
handler.RegisterRouterAuth(v1.Group("/auth"))
|
||||
handler.RegisterRouterUser(v1.Group("/user"))
|
||||
handler.RegisterRouterCateage(v1.Group("/cateage"))
|
||||
v1.GET("/proxy", handler.Proxy)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package handler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/zhilv666/navsite/internal/model"
|
||||
"github.com/zhilv666/navsite/internal/service"
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/zhilv666/navsite/internal/service"
|
||||
"github.com/zhilv666/navsite/pkg/common"
|
||||
)
|
||||
|
||||
func GetAllCateageWithSites(c *gin.Context) {
|
||||
cateagies, err := service.GetAllCateageWithSites()
|
||||
if err != nil {
|
||||
common.Fail(c, err.Error())
|
||||
return
|
||||
}
|
||||
common.Succ(c, cateagies)
|
||||
}
|
||||
|
||||
func RegisterRouterCateage(g *gin.RouterGroup) {
|
||||
g.GET("/", GetAllCateageWithSites)
|
||||
}
|
||||
Reference in New Issue
Block a user