Handbook
Glossary
<new-post-action> ( -- action )
Vocabulary
webapps
.
blogs
Inputs
None
Outputs
action
an
object
Definition
USING:
accessors
calendar
db.tuples
furnace.actions
furnace.auth
furnace.redirection
html.forms
kernel
;
IN:
webapps.blogs
:
<new-post-action>
( -- action )
<page-action>
[
validate-post
username
"author"
set-value
]
>>validate
[
f
<post-state>
dup
{
"title"
"content"
}
to-object
username
>>author
now
>>date
[
insert-tuple
]
[
entity-url
<redirect>
]
bi
]
>>submit
{
blogs
"new-post"
}
>>template
<protected>
"make a new blog post"
>>description
;