Don't allow reconfiguring the site
This commit is contained in:
parent
98dc41aa0a
commit
00925bb267
|
@ -15,6 +15,13 @@ func (b *Blog) SetupHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
Form: forms.Setup{},
|
Form: forms.Setup{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reject if we're already set up.
|
||||||
|
s, _ := settings.Load()
|
||||||
|
if s.Initialized {
|
||||||
|
b.FlashAndRedirect(w, r, "/", "This website has already been configured.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if r.Method == http.MethodPost {
|
if r.Method == http.MethodPost {
|
||||||
form := forms.Setup{
|
form := forms.Setup{
|
||||||
Username: r.FormValue("username"),
|
Username: r.FormValue("username"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user