Unify repo settings & show better error (#19828)

* Unify context data
* Actually show invalid url in error
This commit is contained in:
Gusted
2022-06-12 07:43:27 +02:00
committed by GitHub
parent 3898fc5bda
commit edf14202fe
7 changed files with 18 additions and 14 deletions

View File

@ -730,8 +730,10 @@ func RegisterRoutes(m *web.Route) {
m.Group("/{username}/{reponame}", func() {
m.Group("/settings", func() {
m.Combo("").Get(repo.Settings).
Post(bindIgnErr(forms.RepoSettingForm{}), repo.SettingsPost)
m.Group("", func() {
m.Combo("").Get(repo.Settings).
Post(bindIgnErr(forms.RepoSettingForm{}), repo.SettingsPost)
}, repo.SettingsCtxData)
m.Post("/avatar", bindIgnErr(forms.AvatarForm{}), repo.SettingsAvatar)
m.Post("/avatar/delete", repo.SettingsDeleteAvatar)