mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-15 04:21:22 +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);
|
||||
|
||||
impl TokenRequest {
|
||||
pub fn to_token(self) -> CandidateToken {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
#[rocket::async_trait]
|
||||
impl<'r> FromRequest<'r> for TokenRequest {
|
||||
type Error = Status;
|
||||
|
|
|
|||
Loading…
Reference in a new issue