25 lines
552 B
Go
Raw Normal View History

// Code scaffolded by goctl. Safe to edit.
// goctl 1.9.2
package menu
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"muyu-apiserver/gateway/internal/logic/system/menu"
"muyu-apiserver/gateway/internal/svc"
)
func ListMenuHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := menu.NewListMenuLogic(r.Context(), svcCtx)
resp, err := l.ListMenu()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}