Major improvement, security handling, file handling +fixes
This commit is contained in:
@@ -28,6 +28,8 @@ pub enum CgcxError {
|
||||
RateLimited,
|
||||
#[error("bad request: {0}")]
|
||||
BadRequest(String),
|
||||
#[error("blocked hash")]
|
||||
BlockedHash,
|
||||
#[error("insufficient storage")]
|
||||
InsufficientStorage,
|
||||
#[error("io error: {0}")]
|
||||
|
||||
@@ -44,6 +44,7 @@ pub struct Content {
|
||||
pub max_views: Option<u64>,
|
||||
pub allow_download: bool,
|
||||
pub password_hash: Option<String>,
|
||||
pub show_author: bool,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub deleted_at: Option<DateTime<Utc>>,
|
||||
}
|
||||
@@ -61,6 +62,8 @@ pub struct ContentFile {
|
||||
pub encrypted_hash: Vec<u8>,
|
||||
pub render_flags: u32,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub plaintext_hash: Vec<u8>,
|
||||
pub ref_count: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user