summaryrefslogtreecommitdiff
path: root/src/graphql/mutation.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-08-30 15:43:29 +0200
committerSanto Cariotti <santo@dcariotti.me>2024-08-30 15:43:29 +0200
commitc11d902f7e37e5bbd5565bf7353e459c793ade52 (patch)
tree9c93cf309c22923468d366749eb094f7899b80f3 /src/graphql/mutation.rs
parent7c492396257462f96aba047febf3168f8ec2524e (diff)
Return user_id on JWT creation
Diffstat (limited to 'src/graphql/mutation.rs')
-rw-r--r--src/graphql/mutation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graphql/mutation.rs b/src/graphql/mutation.rs
index 140d98a..682d9b6 100644
--- a/src/graphql/mutation.rs
+++ b/src/graphql/mutation.rs
@@ -39,7 +39,7 @@ impl Mutation {
// Create a new claim using the found ID
let claims = jwt::Claims::new(id[0]);
let token = claims.get_token().unwrap();
- Ok(jwt::AuthBody::new(token))
+ Ok(jwt::AuthBody::new(token, id[0]))
} else {
Err(Error::new("Invalid email or password"))
}