* Replacing extract_uid with qs_param!(...) usage
This commit is contained in:
parent
4c92b20e74
commit
ba5db17706
@ -6,6 +6,7 @@ use chrono::{Utc, Duration};
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::routes;
|
use crate::routes;
|
||||||
|
use crate::qs_param;
|
||||||
|
|
||||||
use db::{member::Member, common::FromDB};
|
use db::{member::Member, common::FromDB};
|
||||||
use db::Response;
|
use db::Response;
|
||||||
@ -199,9 +200,9 @@ pub async fn login_get_jwt(p: &Pool, response: &mut hyper::Response<hyper::Body>
|
|||||||
encode
|
encode
|
||||||
};
|
};
|
||||||
use hyper::header::HeaderValue;
|
use hyper::header::HeaderValue;
|
||||||
use crate::http::{self, extract_uid};
|
use crate::http;
|
||||||
|
|
||||||
let id = extract_uid(¶ms); // only route where we have the "id is there guarantee"
|
let id = qs_param!(params, "id", u64).unwrap();
|
||||||
|
|
||||||
|
|
||||||
let claim = Claim::new(id);
|
let claim = Claim::new(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user