Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
corteza
corteza-server
Commits
32ce2216
Commit
32ce2216
authored
5 years ago
by
Denis Arh
Browse files
Options
Download
Email Patches
Plain Diff
Add generated code for added page weight
parent
526a76dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
api/compose/spec/page.json
api/compose/spec/page.json
+6
-0
compose/rest/request/page.go
compose/rest/request/page.go
+4
-0
No files found.
api/compose/spec/page.json
View file @
32ce2216
...
...
@@ -189,6 +189,12 @@
"title"
:
"Description"
,
"type"
:
"string"
},
{
"name"
:
"weight"
,
"required"
:
false
,
"title"
:
"Page tree weight"
,
"type"
:
"int"
},
{
"name"
:
"visible"
,
"required"
:
false
,
...
...
This diff is collapsed.
Click to expand it.
compose/rest/request/page.go
View file @
32ce2216
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment