Add ordering to categories, gallery images, and team members (#501)

This commit is contained in:
triphora
2022-12-23 14:34:04 -05:00
committed by GitHub
parent 9fed1cde25
commit 16d5a70c08
11 changed files with 1217 additions and 1041 deletions

View File

@@ -240,6 +240,7 @@ pub struct NewGalleryItem {
#[validate(length(min = 1, max = 2048))]
/// The description of the gallery item
pub description: Option<String>,
pub ordering: i64,
}
pub struct UploadedFile {
@@ -553,6 +554,7 @@ pub async fn project_create_inner(
title: item.title.clone(),
description: item.description.clone(),
created: Utc::now(),
ordering: item.ordering,
});
continue;
@@ -650,6 +652,7 @@ pub async fn project_create_inner(
permissions: crate::models::teams::Permissions::ALL,
accepted: true,
payouts_split: Decimal::ONE_HUNDRED,
ordering: 0,
}],
};
@@ -763,6 +766,7 @@ pub async fn project_create_inner(
title: x.title.clone(),
description: x.description.clone(),
created: x.created,
ordering: x.ordering,
})
.collect(),
};