mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 08:59:31 -05:00
wip: found backend for settings update
This commit is contained in:
parent
9dcdf8d828
commit
6901ae4b99
1 changed files with 10 additions and 0 deletions
|
@ -185,6 +185,16 @@ func SettingsPost(ctx *context.Context) {
|
||||||
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
|
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
|
||||||
ctx.Redirect(repo.Link() + "/settings")
|
ctx.Redirect(repo.Link() + "/settings")
|
||||||
|
|
||||||
|
case "federation":
|
||||||
|
if !setting.Federation.Enabled {
|
||||||
|
ctx.NotFound("", nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Validate semicolon separation
|
||||||
|
// TODO: Validate Element isURL
|
||||||
|
// TODO: Validate Element denominates Repository
|
||||||
|
|
||||||
case "mirror":
|
case "mirror":
|
||||||
if !setting.Mirror.Enabled || !repo.IsMirror || repo.IsArchived {
|
if !setting.Mirror.Enabled || !repo.IsMirror || repo.IsArchived {
|
||||||
ctx.NotFound("", nil)
|
ctx.NotFound("", nil)
|
||||||
|
|
Loading…
Reference in a new issue