mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Make gitea serv use api/internal (#4886)
* Start to move to internal/private * Add GetPublicKeyByID * Add HasDeployKey * Add private.UpdateDeployKeyUpdated * Add private.GetUserByKeyID * Add private.AccessLevel * Add private.CheckUnitUser * Fix mistakes I made * Some cleaning + moving code to separate files * Fix error handling * Remove useless error handling for setup * lint: fix comment on exported func * fix copyright header * Fix order of args
This commit is contained in:
committed by
Lunny Xiao
parent
aefeb8c465
commit
617a2433a3
@@ -33,7 +33,7 @@ func GetProtectedBranchBy(repoID int64, branchName string) (*models.ProtectedBra
|
||||
|
||||
// All 2XX status codes are accepted and others will return an error
|
||||
if resp.StatusCode/100 != 2 {
|
||||
return nil, fmt.Errorf("Failed to update public key: %s", decodeJSONError(resp).Err)
|
||||
return nil, fmt.Errorf("Failed to get protected branch: %s", decodeJSONError(resp).Err)
|
||||
}
|
||||
|
||||
return &branch, nil
|
||||
|
Reference in New Issue
Block a user