mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-07 07:55:48 +08:00
简化数据库查询代码
This commit is contained in:
@@ -90,7 +90,7 @@ func (this *NodeGrantDAO) CreateGrant(adminId int64, name string, method string,
|
||||
op.Description = description
|
||||
op.NodeId = nodeId
|
||||
op.State = NodeGrantStateEnabled
|
||||
_, err = this.Save(op)
|
||||
err = this.Save(op)
|
||||
return types.Int64(op.Id), err
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (this *NodeGrantDAO) UpdateGrant(grantId int64, name string, method string,
|
||||
}
|
||||
op.Description = description
|
||||
op.NodeId = nodeId
|
||||
_, err := this.Save(op)
|
||||
err := this.Save(op)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user