mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-24 17:11:49 +00:00
feat: to_token
This commit is contained in:
parent
3c4331f966
commit
951c5de04f
1 changed files with 6 additions and 0 deletions
|
|
@ -7,6 +7,12 @@ use portfolio_core::token::decode_candidate_token;
|
||||||
|
|
||||||
pub struct TokenRequest(CandidateToken);
|
pub struct TokenRequest(CandidateToken);
|
||||||
|
|
||||||
|
impl TokenRequest {
|
||||||
|
pub fn to_token(self) -> CandidateToken {
|
||||||
|
self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[rocket::async_trait]
|
#[rocket::async_trait]
|
||||||
impl<'r> FromRequest<'r> for TokenRequest {
|
impl<'r> FromRequest<'r> for TokenRequest {
|
||||||
type Error = Status;
|
type Error = Status;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue