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