mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-10 10:11:03 +00:00
fix: get key cookie value instead of private_key val
This commit is contained in:
parent
4b0416695d
commit
c420eb394a
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ impl<'r> FromRequest<'r> for AdminAuth {
|
|||
type Error = Option<String>;
|
||||
async fn from_request(req: &'r Request<'_>) -> Outcome<AdminAuth, (Status, Self::Error), ()> {
|
||||
let cookie_id = req.cookies().get_private("id");
|
||||
let cookie_private_key = req.cookies().get_private("private_key");
|
||||
let cookie_private_key = req.cookies().get_private("key");
|
||||
|
||||
let Some(cookie_id) = cookie_id else {
|
||||
return Outcome::Failure((Status::Unauthorized, None));
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ impl<'r> FromRequest<'r> for CandidateAuth {
|
|||
req: &'r Request<'_>,
|
||||
) -> Outcome<CandidateAuth, (Status, Self::Error), ()> {
|
||||
let cookie_id = req.cookies().get_private("id");
|
||||
let cookie_private_key = req.cookies().get_private("private_key");
|
||||
let cookie_private_key = req.cookies().get_private("key");
|
||||
|
||||
let Some(cookie_id) = cookie_id else {
|
||||
return Outcome::Failure((Status::Unauthorized, None));
|
||||
|
|
|
|||
Loading…
Reference in a new issue