Force files to be unique, require all new versions to have at least one file (#236)

This commit is contained in:
Geometrically
2021-08-21 19:38:32 -07:00
committed by GitHub
parent ffd9a34cf5
commit 4073a7abc3
4 changed files with 98 additions and 4 deletions

View File

@@ -289,7 +289,7 @@ Get logged in user
pub async fn project_create_inner(
req: HttpRequest,
mut payload: Multipart,
transaction: &mut sqlx::Transaction<'_, sqlx::Postgres>,
mut transaction: &mut sqlx::Transaction<'_, sqlx::Postgres>,
file_host: &dyn FileHost,
uploaded_files: &mut Vec<UploadedFile>,
) -> Result<HttpResponse, CreateError> {
@@ -512,6 +512,7 @@ pub async fn project_create_inner(
version_data.game_versions.clone(),
&all_game_versions,
false,
&mut transaction,
)
.await?;
}