fusenapi/server/data-transfer/internal/handler/getstandardlogolisthandler.go
laodaming a9e0f6b98e fix
2023-06-08 11:03:20 +08:00

26 lines
681 B
Go

package handler
import (
"errors"
logic2 "fusenapi/server/data-transfer/internal/logic"
svc2 "fusenapi/server/data-transfer/internal/svc"
"net/http"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/rest/httpx"
)
func GetStandardLogoListHandler(svcCtx *svc2.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := logic2.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)
}
}
}