/project
This commit is contained in:
parent
43a9beaef8
commit
dc595a4d87
7 changed files with 50 additions and 10 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue