fusenapi/data-transfer/internal/handler/getstandardlogolisthandler.go

27 lines
654 B
Go
Raw Normal View History

2023-06-07 11:47:45 +00:00
package handler
import (
"errors"
"net/http"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
"fusenapi/data-transfer/internal/logic"
"fusenapi/data-transfer/internal/svc"
)
func GetStandardLogoListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := logic.NewGetStandardLogoListLogic(r.Context(), svcCtx)
resp := l.GetStandardLogoList()
if resp != nil {
httpx.OkJsonCtx(r.Context(), w, resp)
} else {
err := errors.New("server logic is error, resp must not be nil")
httpx.ErrorCtx(r.Context(), w, err)
logx.Error(err)
}
}
}