mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tutorials: remove unnecessary json.encode (#15464)
This commit is contained in:
parent
f10ff0353e
commit
6ed69289a8
@ -384,12 +384,11 @@ in V is very simple:
|
||||
```v oksyntax
|
||||
// article.v
|
||||
import vweb
|
||||
import json
|
||||
|
||||
['/articles'; get]
|
||||
pub fn (mut app App) articles() vweb.Result {
|
||||
articles := app.find_all_articles()
|
||||
return app.json(json.encode(articles))
|
||||
return app.json(articles)
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user