From 8736f26a1cac19d809d4ba146c039efa8d962f06 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 16 Aug 2022 22:19:58 +0300 Subject: [PATCH] tutorials: simplify new_article() a bit --- .../building_a_simple_web_blog_with_vweb/code/blog/blog.v | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tutorials/building_a_simple_web_blog_with_vweb/code/blog/blog.v b/tutorials/building_a_simple_web_blog_with_vweb/code/blog/blog.v index d6284ce55..7e80713b7 100644 --- a/tutorials/building_a_simple_web_blog_with_vweb/code/blog/blog.v +++ b/tutorials/building_a_simple_web_blog_with_vweb/code/blog/blog.v @@ -49,9 +49,7 @@ pub fn (mut app App) new() vweb.Result { } ['/new_article'; post] -pub fn (mut app App) new_article() vweb.Result { - title := app.form['title'] - text := app.form['text'] +pub fn (mut app App) new_article(title string, text string) vweb.Result { if title == '' || text == '' { return app.text('Empty text/title') } -- 2.30.2