Switch to time crate, add file sizes (#329)

* Switch to time crate, add file sizes

* Update deps, adjust pack format

* Run formatter, fix clippy
This commit is contained in:
Geometrically
2022-03-29 19:35:09 -07:00
committed by GitHub
parent a3d5479878
commit 80e00a80d5
38 changed files with 563 additions and 318 deletions

View File

@@ -8,6 +8,7 @@ use actix_web::{delete, get, post, web, HttpRequest, HttpResponse};
use futures::StreamExt;
use serde::Deserialize;
use sqlx::PgPool;
use time::OffsetDateTime;
#[derive(Deserialize)]
pub struct CreateReport {
@@ -59,7 +60,7 @@ pub async fn report_create(
user_id: None,
body: new_report.body.clone(),
reporter: current_user.id.into(),
created: chrono::Utc::now(),
created: OffsetDateTime::now_utc(),
};
match new_report.item_type {
@@ -108,7 +109,7 @@ pub async fn report_create(
item_type: new_report.item_type.clone(),
reporter: current_user.id,
body: new_report.body.clone(),
created: chrono::Utc::now(),
created: OffsetDateTime::now_utc(),
}))
}