fix: fix dropped errors in GetUser() (#2470)

* controllers: fix dropped errors

* Update user.go

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
Lars Lehtonen 2023-11-01 08:07:24 -07:00 committed by GitHub
parent 477a090aa0
commit b985bab3f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,7 +161,6 @@ func (c *ApiController) GetUser() {
} }
var user *object.User var user *object.User
if id == "" && owner == "" { if id == "" && owner == "" {
switch { switch {
case email != "": case email != "":
@ -176,7 +175,8 @@ func (c *ApiController) GetUser() {
owner = util.GetOwnerFromId(id) owner = util.GetOwnerFromId(id)
} }
organization, err := object.GetOrganization(util.GetId("admin", owner)) var organization *object.Organization
organization, err = object.GetOrganization(util.GetId("admin", owner))
if err != nil { if err != nil {
c.ResponseError(err.Error()) c.ResponseError(err.Error())
return return