Commit 32ce2216 authored by Denis Arh's avatar Denis Arh
Browse files

Add generated code for added page weight

parent 526a76dd
......@@ -189,6 +189,12 @@
"title": "Description",
"type": "string"
},
{
"name": "weight",
"required": false,
"title": "Page tree weight",
"type": "int"
},
{
"name": "visible",
"required": false,
......
......@@ -335,6 +335,7 @@ func (r PageUpdate) Auditable() map[string]interface{} {
out["title"] = r.Title
out["handle"] = r.Handle
out["description"] = r.Description
out["weight"] = r.Weight
out["visible"] = r.Visible
out["blocks"] = r.Blocks
......@@ -385,6 +386,9 @@ func (r *PageUpdate) Fill(req *http.Request) (err error) {
if val, ok := post["description"]; ok {
r.Description = val
}
if val, ok := post["weight"]; ok {
r.Weight = parseInt(val)
}
if val, ok := post["visible"]; ok {
r.Visible = parseBool(val)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment