mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-07 12:28:39 +00:00
Check if all resources exist before publishing a level
This commit is contained in:
parent
6588176551
commit
626fffa5e0
1 changed files with 5 additions and 0 deletions
|
@ -86,6 +86,11 @@ public class PublishController : ControllerBase
|
|||
Slot? slot = await this.getSlotFromBody();
|
||||
if (slot?.Location == null) return this.BadRequest();
|
||||
|
||||
foreach (string resource in slot.Resources)
|
||||
{
|
||||
if (!FileHelper.ResourceExists(resource)) return this.BadRequest();
|
||||
}
|
||||
|
||||
// Republish logic
|
||||
if (slot.SlotId != 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue