Improve error handling for GetUser()

This commit is contained in:
Yang Luo 2023-10-31 14:01:37 +08:00
parent cf10738f45
commit 1bf5497d08

View File

@ -181,6 +181,10 @@ func (c *ApiController) GetUser() {
c.ResponseError(err.Error())
return
}
if organization == nil {
c.ResponseError(fmt.Sprintf("the organization: %s is not found", owner))
return
}
if !organization.IsProfilePublic {
requestUserId := c.GetSessionUsername()