crate updates
This commit is contained in:
parent
3aa1e9546d
commit
311fbb2170
4 changed files with 722 additions and 681 deletions
|
|
@ -39,9 +39,10 @@ impl PasswordResetToken {
|
|||
|
||||
pub fn parse(raw: &str) -> Result<Self, Error> {
|
||||
let (token, timestamp_str) = raw.split_once('-').ok_or(Error::TokenFormat)?;
|
||||
let expires_at = Utc
|
||||
.datetime_from_str(timestamp_str, "%s")
|
||||
.map_err(|_| Error::TimeFormat)?;
|
||||
let expires_at = DateTime::parse_from_str(timestamp_str, "%s")
|
||||
.map_err(|_| Error::TimeFormat)?
|
||||
.naive_utc()
|
||||
.and_utc();
|
||||
|
||||
Ok(Self {
|
||||
token: token.to_string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue