diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2024-08-30 13:43:29 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2024-08-30 13:43:29 +0000 |
| commit | c11d902f7e37e5bbd5565bf7353e459c793ade52 (patch) | |
| tree | 9c93cf309c22923468d366749eb094f7899b80f3 /src/graphql/types | |
| parent | 7c492396257462f96aba047febf3168f8ec2524e (diff) | |
Return user_id on JWT creation
Diffstat (limited to 'src/graphql/types')
| -rw-r--r-- | src/graphql/types/jwt.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/graphql/types/jwt.rs b/src/graphql/types/jwt.rs index 475b1bd..df815aa 100644 --- a/src/graphql/types/jwt.rs +++ b/src/graphql/types/jwt.rs @@ -77,13 +77,16 @@ pub struct AuthBody { access_token: String, /// "Bearer" string token_type: String, + /// User id + user_id: i32, } impl AuthBody { - pub fn new(access_token: String) -> Self { + pub fn new(access_token: String, user_id: i32) -> Self { Self { access_token, token_type: "Bearer".to_string(), + user_id, } } } |
