use single line return for SaveAccount

This commit is contained in:
Pascal Fischer 2023-03-21 14:02:34 +01:00
parent 82af60838e
commit 8e4710763e

View File

@ -210,8 +210,7 @@ func (am *DefaultAccountManager) AddPATToUser(accountID string, userID string, p
user.PATs[pat.ID] = pat
err = am.Store.SaveAccount(account)
return err
return am.Store.SaveAccount(account)
}
// DeletePAT deletes a specific PAT from a user
@ -244,8 +243,7 @@ func (am *DefaultAccountManager) DeletePAT(accountID string, userID string, toke
}
delete(user.PATs, tokenID)
err = am.Store.SaveAccount(account)
return err
return am.Store.SaveAccount(account)
}
// SaveUser saves updates a given user. If the user doesn't exit it will throw status.NotFound error.