Allow gallery featuring, add gallery images to search, rename rejection reasons, transfer ownership route (#226)

This commit is contained in:
Geometrically
2021-07-27 16:50:07 -07:00
committed by GitHub
parent bc983162f3
commit 76b62eda3a
16 changed files with 1414 additions and 1130 deletions

View File

@@ -44,7 +44,7 @@ pub struct Project {
/// The status of the project
pub status: ProjectStatus,
/// The rejection data of the project
pub rejection_data: Option<RejectionReason>,
pub moderator_message: Option<ModeratorMessage>,
/// The license of this project
pub license: License,
@@ -77,12 +77,18 @@ pub struct Project {
pub donation_urls: Option<Vec<DonationLink>>,
/// A string of URLs to visual content featuring the project
pub gallery: Vec<String>,
pub gallery: Vec<GalleryItem>,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct RejectionReason {
pub reason: String,
pub struct GalleryItem {
pub url: String,
pub featured: bool,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct ModeratorMessage {
pub message: String,
pub body: Option<String>,
}

View File

@@ -9,6 +9,7 @@ use serde::{Deserialize, Serialize};
pub struct TeamId(pub u64);
pub const OWNER_ROLE: &str = "Owner";
pub const DEFAULT_ROLE: &str = "Member";
// TODO: permissions, role names, etc
/// A team of users who control a project