mirror of
https://github.com/go-gitea/gitea
synced 2024-11-25 21:32:56 +01:00
add route for webui
This commit is contained in:
parent
5dd06235cc
commit
bc81f757b1
2 changed files with 11 additions and 0 deletions
|
@ -321,6 +321,16 @@ func DeleteProtectedBranchRulePost(ctx *context.Context) {
|
|||
ctx.JSONRedirect(fmt.Sprintf("%s/settings/branches", ctx.Repo.RepoLink))
|
||||
}
|
||||
|
||||
func UpdateBranchProtectionPriories(ctx *context.Context) {
|
||||
form := web.GetForm(ctx).([]int64)
|
||||
repo := ctx.Repo.Repository
|
||||
|
||||
if err := git_model.UpdateProtectBranchPriorities(ctx, repo, form); err != nil {
|
||||
ctx.ServerError("UpdateProtectBranchPriorities", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// RenameBranchPost responses for rename a branch
|
||||
func RenameBranchPost(ctx *context.Context) {
|
||||
form := web.GetForm(ctx).(*forms.RenameBranchForm)
|
||||
|
|
|
@ -1075,6 +1075,7 @@ func registerRoutes(m *web.Router) {
|
|||
m.Combo("/edit").Get(repo_setting.SettingsProtectedBranch).
|
||||
Post(web.Bind(forms.ProtectBranchForm{}), context.RepoMustNotBeArchived(), repo_setting.SettingsProtectedBranchPost)
|
||||
m.Post("/{id}/delete", repo_setting.DeleteProtectedBranchRulePost)
|
||||
m.Post("/priority", web.Bind([]int64{}), context.RepoMustNotBeArchived(), repo_setting.UpdateBranchProtectionPriories)
|
||||
})
|
||||
|
||||
m.Group("/tags", func() {
|
||||
|
|
Loading…
Reference in a new issue