crate updates

This commit is contained in:
Philippe Loctaux 2023-11-20 23:19:01 +01:00
parent 3aa1e9546d
commit 311fbb2170
4 changed files with 722 additions and 681 deletions

1382
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@ use lettre::transport::smtp::authentication::Credentials;
use lettre::transport::smtp::response::Response;
use lettre::{AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor};
use mrml::mjml::Mjml;
use mrml::prelude::parse::Error as MjmlParserError;
use mrml::prelude::parser::Error as MjmlParserError;
use mrml::prelude::render::{Error as MjmlRenderError, Options};
use serde::{Deserialize, Serialize};
use tera::{Context, Tera};

View file

@ -7,16 +7,16 @@ edition = "2021"
rocket = { version = "0.5.0", features = ["json"] }
rocket_db_pools = { version = "0.1.0", features = ["sqlx_sqlite"] }
rocket_dyn_templates = { version = "0.1.0", features = ["tera"] }
infer = { version = "0.13", default-features = false }
infer = { version = "0.15", default-features = false }
erased-serde = "0.3"
url = { workspace = true }
futures = "0.3"
base64 = "0.21.0"
rocket_cors = "0.6.0"
base64 = "0.21"
rocket_cors = "0.6"
email_address = { workspace = true }
chrono-tz = "0.8.2"
chrono-humanize = "0.2.2"
minify-html = "0.10.8"
chrono-tz = "0.8"
chrono-humanize = "0.2"
minify-html = "0.11"
# local crates
database_pool = { path = "../database_pool" }

View file

@ -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(),