1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-12 13:37:20 +00:00

Move delete deploy keys into service layer (#32201)

This commit is contained in:
Lunny Xiao
2024-12-17 20:10:38 -08:00
committed by GitHub
parent e4c4629465
commit f9f62b4c4c
7 changed files with 61 additions and 66 deletions

View File

@ -217,6 +217,7 @@ func (err ErrGPGKeyAccessDenied) Unwrap() error {
// ErrKeyAccessDenied represents a "KeyAccessDenied" kind of error.
type ErrKeyAccessDenied struct {
UserID int64
RepoID int64
KeyID int64
Note string
}
@ -228,8 +229,8 @@ func IsErrKeyAccessDenied(err error) bool {
}
func (err ErrKeyAccessDenied) Error() string {
return fmt.Sprintf("user does not have access to the key [user_id: %d, key_id: %d, note: %s]",
err.UserID, err.KeyID, err.Note)
return fmt.Sprintf("user does not have access to the key [user_id: %d, repo_id: %d, key_id: %d, note: %s]",
err.UserID, err.RepoID, err.KeyID, err.Note)
}
func (err ErrKeyAccessDenied) Unwrap() error {