Secure auth route, fix quilt deps bug, optimize queries more (#374)

* Secure auth route, fix quilt deps bug, optimize queries more

* Add to_lowercase for multiple hashes functions
This commit is contained in:
Geometrically
2022-06-17 16:56:28 -07:00
committed by GitHub
parent 355689ed19
commit 782bb11894
15 changed files with 842 additions and 592 deletions

View File

@@ -2,6 +2,7 @@
// TODO: remove attr once routes are created
use thiserror::Error;
use time::OffsetDateTime;
pub mod categories;
pub mod ids;
@@ -125,3 +126,11 @@ impl ids::ProjectTypeId {
Ok(result.map(|r| ids::ProjectTypeId(r.id)))
}
}
pub fn convert_postgres_date(input: &str) -> OffsetDateTime {
OffsetDateTime::parse(
format!("{}:00Z", input.replace(' ', "T")),
time::Format::Rfc3339,
)
.unwrap_or_else(|_| OffsetDateTime::now_utc())
}