feat: to_token

This commit is contained in:
Sebastian Pravda 2022-10-25 18:41:43 +02:00
parent 3c4331f966
commit 951c5de04f
No known key found for this signature in database
GPG key ID: F3BC84F08EFA3F57

View file

@ -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;