Major improvement, security handling, file handling +fixes

This commit is contained in:
unknown
2026-05-23 00:13:56 +02:00
parent 2129081599
commit a7b44af91a
25 changed files with 925 additions and 116 deletions

View File

@@ -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}")]

View File

@@ -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)]