fix: some api bug
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user