change api routerGroup to api package
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"go-api/pkg/context"
|
||||
"go-api/router/middleware"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var patch = context.PatchContext
|
||||
|
||||
// SetAPIRoute
|
||||
func SetAPIRoute(r *gin.RouterGroup) {
|
||||
r.Use(patch(middleware.ServerPanicCatch()))
|
||||
}
|
||||
Reference in New Issue
Block a user