Small refactoring of modules/private (#15947)
* Use correct variable name. * doer is never nil here. * Use status code constants. * Replaced generic map with concrete struct. * Fixed windows lint. * Removed unused method. * Changed error codes. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
5930d09096
commit
383ffcfa34
13 changed files with 185 additions and 231 deletions
|
@ -26,7 +26,7 @@ func DeleteBranch(doer *models.User, repo *models.Repository, gitRepo *git.Repos
|
|||
return ErrBranchIsDefault
|
||||
}
|
||||
|
||||
isProtected, err := repo.IsProtectedBranch(branchName, doer)
|
||||
isProtected, err := repo.IsProtectedBranch(branchName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue