Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into feature/auth

This commit is contained in:
eson
2023-08-09 14:21:22 +08:00
27 changed files with 830 additions and 56 deletions

View File

@@ -13,7 +13,8 @@ import (
func UploadFileBaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
// data, _ := io.ReadAll(r.Body)
// log.Println(string(data))
var req types.UploadFileBaseReq
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
if err != nil {

View File

@@ -87,8 +87,7 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
postMap["logo_url"] = req.ResourceUrl
postMapB, _ := json.Marshal(postMap)
contentType := "application/json"
result, err := http.Post(l.svcCtx.Config.BLMService.ImageProcess.Url, contentType, strings.NewReader(string(postMapB)))
result, err := http.Post(l.svcCtx.Config.BLMService.ImageProcess.Url, "application/json", strings.NewReader(string(postMapB)))
if err != nil {
logx.Error(err)
return resp.SetStatus(basic.CodeFileUploadLogoErr, "service fail")