You've already forked AstralRinth
forked from didirus/AstralRinth
More project data (#406)
* More project data * Array_agg fixes + cleanup * fix prepare * Add approval dates to search * Update migrations/20220725204351_more-project-data.sql Co-authored-by: wafflecoffee <emmaffle@modrinth.com> * Add category labels + display categories Co-authored-by: wafflecoffee <emmaffle@modrinth.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use super::{DeleteFileData, FileHost, FileHostingError, UploadFileData};
|
||||
use async_trait::async_trait;
|
||||
use bytes::Bytes;
|
||||
use chrono::Utc;
|
||||
use sha2::Digest;
|
||||
use time::OffsetDateTime;
|
||||
|
||||
pub struct MockHost(());
|
||||
|
||||
@@ -39,7 +39,7 @@ impl FileHost for MockHost {
|
||||
content_sha1,
|
||||
content_md5: None,
|
||||
content_type: content_type.to_string(),
|
||||
upload_timestamp: OffsetDateTime::now_utc().unix_timestamp() as u64,
|
||||
upload_timestamp: Utc::now().timestamp() as u64,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ use crate::file_hosting::{
|
||||
};
|
||||
use async_trait::async_trait;
|
||||
use bytes::Bytes;
|
||||
use chrono::Utc;
|
||||
use s3::bucket::Bucket;
|
||||
use s3::creds::Credentials;
|
||||
use s3::region::Region;
|
||||
use sha2::Digest;
|
||||
use time::OffsetDateTime;
|
||||
|
||||
pub struct S3Host {
|
||||
bucket: Bucket,
|
||||
@@ -85,7 +85,7 @@ impl FileHost for S3Host {
|
||||
content_sha1,
|
||||
content_md5: None,
|
||||
content_type: content_type.to_string(),
|
||||
upload_timestamp: OffsetDateTime::now_utc().unix_timestamp() as u64,
|
||||
upload_timestamp: Utc::now().timestamp() as u64,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user