tutorials: fix index() (#5732)

This commit is contained in:
Lukas Neubert 2020-07-07 22:01:18 +02:00 committed by GitHub
parent 246e7e8464
commit 317b2dc579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View file

@ -16,18 +16,18 @@ fn main() {
}
/*
fn (mut app App) index_text() vweb.Result {
pub fn (mut app App) index_text() vweb.Result {
app.vweb.text('Hello, world from vweb!')
return vweb.Result{}
}
fn (app &App) index_html() vweb.Result {
pub fn (app &App) index_html() vweb.Result {
message := 'Hello, world from Vweb!'
return $vweb.html()
}
*/
fn (app &App) index() vweb.Result {
pub fn (app &App) index() vweb.Result {
articles := app.find_all_articles()
return $vweb.html()
}