mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
all: update remaining deprecated attr syntax (#19908)
This commit is contained in:
parent
709976f42e
commit
b347f546f2
11 changed files with 64 additions and 64 deletions
|
@ -140,7 +140,7 @@ fn new_app() &App {
|
|||
return app
|
||||
}
|
||||
|
||||
['/'; get]
|
||||
@['/'; get]
|
||||
pub fn (mut app App) controller_get_all_task() vweb.Result {
|
||||
file := os.read_file('./index.html') or { panic(err) }
|
||||
return app.html(file)
|
||||
|
|
|
@ -142,7 +142,7 @@ fn new_app() &App {
|
|||
return app
|
||||
}
|
||||
|
||||
['/'; get]
|
||||
@['/'; get]
|
||||
pub fn (mut app App) controller_get_all_task() vweb.Result {
|
||||
file := os.read_file('./index.html') or { panic(err) }
|
||||
return app.html(file)
|
||||
|
|
|
@ -54,7 +54,7 @@ exit
|
|||
In `v_vweb_orm/src/main.v`, create a route that returns a `Response` struct.
|
||||
|
||||
```v ignore
|
||||
['/sqlite-memory/:count']
|
||||
@['/sqlite-memory/:count']
|
||||
pub fn (mut app App) sqlite_memory(count int) vweb.Result {
|
||||
mut insert_stopwatchs := []int{}
|
||||
mut select_stopwatchs := []int{}
|
||||
|
|
|
@ -19,7 +19,7 @@ In `examples/js_dom_draw_bechmark_chart/v_vweb_orm/src/main.v` path
|
|||
Create a route returning a `Response` struct like:
|
||||
|
||||
```v ignore
|
||||
['/sqlite-memory/:count']
|
||||
@['/sqlite-memory/:count']
|
||||
pub fn (mut app App) sqlite_memory(count int) vweb.Result {
|
||||
mut insert_stopwatchs := []int{}
|
||||
mut select_stopwatchs := []int{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue