Fixed a bug that prevented {{.Action}} from being acessible in editor.html
This commit is contained in:
parent
c00645432b
commit
533053aef0
@ -38,10 +38,9 @@ func WriteArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data := &EditorHTMLData{Action: "submit"}
|
var data *EditorHTMLData
|
||||||
|
|
||||||
if session.Values["article"] == nil {
|
if session.Values["article"] == nil {
|
||||||
data = &EditorHTMLData{Article: new(b.Article)}
|
data = &EditorHTMLData{Action: "submit", Article: new(b.Article)}
|
||||||
} else {
|
} else {
|
||||||
data = session.Values["article"].(*EditorHTMLData)
|
data = session.Values["article"].(*EditorHTMLData)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user