mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
fix: improve error handling in GetUserApplication()
This commit is contained in:
parent
8b1c4b0c75
commit
721a681ff1
@ -139,6 +139,10 @@ func (c *ApiController) GetUserApplication() {
|
||||
c.ResponseError(err.Error())
|
||||
return
|
||||
}
|
||||
if application == nil {
|
||||
c.ResponseError(fmt.Sprintf(c.T("general:The organization: %s should have one application at least"), user.Owner))
|
||||
return
|
||||
}
|
||||
|
||||
c.ResponseOk(object.GetMaskedApplication(application, userId))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user