crate updates
This commit is contained in:
parent
3aa1e9546d
commit
311fbb2170
4 changed files with 722 additions and 681 deletions
1382
Cargo.lock
generated
1382
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -3,7 +3,7 @@ use lettre::transport::smtp::authentication::Credentials;
|
||||||
use lettre::transport::smtp::response::Response;
|
use lettre::transport::smtp::response::Response;
|
||||||
use lettre::{AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor};
|
use lettre::{AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor};
|
||||||
use mrml::mjml::Mjml;
|
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 mrml::prelude::render::{Error as MjmlRenderError, Options};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tera::{Context, Tera};
|
use tera::{Context, Tera};
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,16 @@ edition = "2021"
|
||||||
rocket = { version = "0.5.0", features = ["json"] }
|
rocket = { version = "0.5.0", features = ["json"] }
|
||||||
rocket_db_pools = { version = "0.1.0", features = ["sqlx_sqlite"] }
|
rocket_db_pools = { version = "0.1.0", features = ["sqlx_sqlite"] }
|
||||||
rocket_dyn_templates = { version = "0.1.0", features = ["tera"] }
|
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"
|
erased-serde = "0.3"
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
base64 = "0.21.0"
|
base64 = "0.21"
|
||||||
rocket_cors = "0.6.0"
|
rocket_cors = "0.6"
|
||||||
email_address = { workspace = true }
|
email_address = { workspace = true }
|
||||||
chrono-tz = "0.8.2"
|
chrono-tz = "0.8"
|
||||||
chrono-humanize = "0.2.2"
|
chrono-humanize = "0.2"
|
||||||
minify-html = "0.10.8"
|
minify-html = "0.11"
|
||||||
|
|
||||||
# local crates
|
# local crates
|
||||||
database_pool = { path = "../database_pool" }
|
database_pool = { path = "../database_pool" }
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,10 @@ impl PasswordResetToken {
|
||||||
|
|
||||||
pub fn parse(raw: &str) -> Result<Self, Error> {
|
pub fn parse(raw: &str) -> Result<Self, Error> {
|
||||||
let (token, timestamp_str) = raw.split_once('-').ok_or(Error::TokenFormat)?;
|
let (token, timestamp_str) = raw.split_once('-').ok_or(Error::TokenFormat)?;
|
||||||
let expires_at = Utc
|
let expires_at = DateTime::parse_from_str(timestamp_str, "%s")
|
||||||
.datetime_from_str(timestamp_str, "%s")
|
.map_err(|_| Error::TimeFormat)?
|
||||||
.map_err(|_| Error::TimeFormat)?;
|
.naive_utc()
|
||||||
|
.and_utc();
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
token: token.to_string(),
|
token: token.to_string(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue