mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
fmt: fix alignment of struct init fields (#22025)
This commit is contained in:
parent
99da5726db
commit
c51d30bf53
671 changed files with 18817 additions and 18787 deletions
|
@ -62,9 +62,9 @@ fn make_token(user User) string {
|
|||
|
||||
jwt_header := JwtHeader{'HS256', 'JWT'}
|
||||
jwt_payload := JwtPayload{
|
||||
sub: '${user.id}'
|
||||
sub: '${user.id}'
|
||||
name: '${user.username}'
|
||||
iat: time.now()
|
||||
iat: time.now()
|
||||
}
|
||||
|
||||
header := base64.url_encode(json.encode(jwt_header).bytes())
|
||||
|
|
|
@ -10,7 +10,7 @@ fn (mut app App) service_add_product(product_name string, user_id int) ! {
|
|||
}
|
||||
|
||||
product_model := Product{
|
||||
name: product_name
|
||||
name: product_name
|
||||
user_id: user_id
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ fn (mut app App) service_add_user(username string, password string) ! {
|
|||
user_model := User{
|
||||
username: username
|
||||
password: hashed_password
|
||||
active: true
|
||||
active: true
|
||||
}
|
||||
|
||||
mut insert_error := ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue