fix version 1
This commit is contained in:
@@ -20,13 +20,13 @@ func DoQuit(ctx context.Context, in *pb.GroupOPRequest) (reply *pb.DataStatusRep
|
||||
return nil, err
|
||||
}
|
||||
// 判断是不是创建者
|
||||
var creator_id uint
|
||||
if err = impl.DBService.Model(&models.GroupBasic{}).Select("creator_id").Where("identity=?", in.GroupIdentity).Scan(&creator_id).Error; err != nil {
|
||||
var creatorID uint
|
||||
if err = impl.DBService.Model(&models.GroupBasic{}).Select("passport_id").Where("identity=?", in.GroupIdentity).Scan(&creatorID).Error; err != nil {
|
||||
printer.Error(err.Error())
|
||||
return nil, errcode.ErrDB
|
||||
}
|
||||
|
||||
if auth.ID == creator_id {
|
||||
if auth.ID == creatorID {
|
||||
return nil, errcode.ErrPermissionDenied
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user