Fix scheduling bug (#693)

* Fix scheduling bug

* Fix comp err
This commit is contained in:
Geometrically 2023-08-23 12:08:18 -04:00 committed by GitHub
parent a1cfdf1a5b
commit e766759b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1596,6 +1596,18 @@ pub async fn project_schedule(
));
}
if !project_item.inner.status.is_approved() {
return Err(ApiError::InvalidInput(
"This project has not been approved yet. Submit to the queue with the private status to schedule it in the future!".to_string(),
));
}
if project_item.inner.webhook_sent {
return Err(ApiError::InvalidInput(
"This project already has been published. It cannot be scheduled!".to_string(),
));
}
sqlx::query!(
"
UPDATE mods