mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
@ -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
|
||||
|
Reference in New Issue
Block a user