Skip to content

Commit 8736f26

Browse files
committed
tutorials: simplify new_article() a bit
1 parent 9b91154 commit 8736f26

File tree

1 file changed

+1
-3
lines changed
  • tutorials/building_a_simple_web_blog_with_vweb/code/blog

1 file changed

+1
-3
lines changed

tutorials/building_a_simple_web_blog_with_vweb/code/blog/blog.v

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ pub fn (mut app App) new() vweb.Result {
4949
}
5050

5151
['/new_article'; post]
52-
pub fn (mut app App) new_article() vweb.Result {
53-
title := app.form['title']
54-
text := app.form['text']
52+
pub fn (mut app App) new_article(title string, text string) vweb.Result {
5553
if title == '' || text == '' {
5654
return app.text('Empty text/title')
5755
}

0 commit comments

Comments
 (0)