Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix scheduling bug (#693)
Browse files Browse the repository at this point in the history
* Fix scheduling bug

* Fix comp err
  • Loading branch information
Geometrically authored Aug 23, 2023
1 parent a1cfdf1 commit e766759
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/routes/v2/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e766759

Please sign in to comment.