You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
404 B
26 lines
404 B
package store
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"net/http"
|
|
"recook/internal/back"
|
|
"recook/internal/gateway/store"
|
|
)
|
|
|
|
func Service() http.Handler {
|
|
e := gin.Default()
|
|
e.Use(store.CORS())
|
|
|
|
e.NoRoute(func(c *gin.Context) {
|
|
back.Fail(c, "请求不存在")
|
|
})
|
|
e.NoMethod(func(c *gin.Context) {
|
|
back.Fail(c, "方法不支持")
|
|
})
|
|
|
|
v1 := e.Group("/api/v1")
|
|
store.SetupRouter(v1)
|
|
|
|
return e
|
|
}
|