mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-26 18:13:40 +01:00
use single line return for SaveAccount
This commit is contained in:
parent
82af60838e
commit
8e4710763e
@ -210,8 +210,7 @@ func (am *DefaultAccountManager) AddPATToUser(accountID string, userID string, p
|
|||||||
|
|
||||||
user.PATs[pat.ID] = pat
|
user.PATs[pat.ID] = pat
|
||||||
|
|
||||||
err = am.Store.SaveAccount(account)
|
return am.Store.SaveAccount(account)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeletePAT deletes a specific PAT from a user
|
// 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)
|
delete(user.PATs, tokenID)
|
||||||
|
|
||||||
err = am.Store.SaveAccount(account)
|
return am.Store.SaveAccount(account)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SaveUser saves updates a given user. If the user doesn't exit it will throw status.NotFound error.
|
// SaveUser saves updates a given user. If the user doesn't exit it will throw status.NotFound error.
|
||||||
|
Loading…
Reference in New Issue
Block a user