mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
parent
8f7c35552d
commit
17000ef7b6
49 changed files with 129 additions and 106 deletions
|
@ -25,7 +25,7 @@ fn (mut app App) service_add_product(product_name string, user_id int) ! {
|
|||
}
|
||||
}
|
||||
|
||||
fn (mut app App) service_get_all_products_from(user_id int) ?[]Product {
|
||||
fn (mut app App) service_get_all_products_from(user_id int) ![]Product {
|
||||
mut db := databases.create_db_connection() or {
|
||||
println(err)
|
||||
return err
|
||||
|
|
|
@ -30,7 +30,7 @@ fn (mut app App) service_add_user(username string, password string) ! {
|
|||
}
|
||||
}
|
||||
|
||||
fn (mut app App) service_get_all_user() ?[]User {
|
||||
fn (mut app App) service_get_all_user() ![]User {
|
||||
mut db := databases.create_db_connection() or {
|
||||
println(err)
|
||||
return err
|
||||
|
@ -47,7 +47,7 @@ fn (mut app App) service_get_all_user() ?[]User {
|
|||
return results
|
||||
}
|
||||
|
||||
fn (mut app App) service_get_user(id int) ?User {
|
||||
fn (mut app App) service_get_user(id int) !User {
|
||||
mut db := databases.create_db_connection() or {
|
||||
println(err)
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue