fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
@@ -36,6 +36,9 @@ func (l *CreateShopLogic) CreateShop(req *types.CreateShopReq) (resp *types.Shop
if err != nil {
return nil, err
}
if ownerID == 0 {
return nil, errors.New("user not authenticated")
}
if req.Name == "" {
return nil, errors.New("name is required")
@@ -46,6 +46,7 @@ func (l *UpdateShopLogic) UpdateShop(req *types.UpdateShopReq) (resp *types.Shop
if current.Shops.OwnerId != userID {
return nil, contextj.ERRILLEGALUSER
}
logx.Debugf("update shop %+v", req)
name := current.Shops.Name
if req.Name != "" {