mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
Improve API error handling.
This commit is contained in:
@ -97,13 +97,12 @@ func UpdateUser(id string, user *User) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
_, err := adapter.engine.ID(core.PK{owner, name}).AllCols().Update(user)
|
||||
affected, err := adapter.engine.ID(core.PK{owner, name}).AllCols().Update(user)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//return affected != 0
|
||||
return true
|
||||
return affected != 0
|
||||
}
|
||||
|
||||
func AddUser(user *User) bool {
|
||||
|
Reference in New Issue
Block a user