[management] Refactor peers to use store methods (#2893)

This commit is contained in:
Bethuel Mmbaga
2025-01-20 20:41:46 +03:00
committed by GitHub
parent c619bf5b0c
commit 1ad2cb5582
30 changed files with 1614 additions and 857 deletions

View File

@@ -86,6 +86,11 @@ func NewAccountNotFoundError(accountKey string) error {
return Errorf(NotFound, "account not found: %s", accountKey)
}
// NewPeerNotPartOfAccountError creates a new Error with PermissionDenied type for a peer not being part of an account
func NewPeerNotPartOfAccountError() error {
return Errorf(PermissionDenied, "peer is not part of this account")
}
// NewUserNotFoundError creates a new Error with NotFound type for a missing user
func NewUserNotFoundError(userKey string) error {
return Errorf(NotFound, "user not found: %s", userKey)