This commit is contained in:
Marko Korhonen 2020-05-01 21:26:22 +03:00
parent 43a9beaef8
commit dc595a4d87
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5
7 changed files with 50 additions and 10 deletions

View file

@ -81,6 +81,7 @@ pub async fn login(
let token = encode_token(user.id, &user.username, user.admin).map_err(|e| match e {
_ => HttpResponse::InternalServerError().finish(),
})?;
println!("Token: {}", token);
id.remember(String::from(token));
Ok(HttpResponse::Ok().json(user))