1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 04:28:21 +00:00

Fix deletion of unprotected branches (#2630)

* fix deletion of unprotected branches

* fmt fix

* changed internal protected branch api

* fix lint error

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
This commit is contained in:
David Schneiderbauer
2017-10-02 22:23:41 +02:00
committed by Lauris BH
parent 3cc5b11b0d
commit e38e502e20
4 changed files with 12 additions and 12 deletions

View File

@@ -20,11 +20,6 @@ func GetProtectedBranchBy(ctx *macaron.Context) {
"err": err.Error(),
})
return
} else if protectBranch != nil {
ctx.JSON(200, protectBranch)
} else {
ctx.JSON(200, &models.ProtectedBranch{
CanPush: true,
})
}
ctx.JSON(200, protectBranch)
}