mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-13 00:31:28 +00:00
Add the ability for moderators to forcibly lock levels (#831)
* Add the ability for moderators to forcibly lock levels * Prevent forcibly locking an already locked level I had to rollback and re-commit this because I was getting some weird error within Rider. * Correct moderation notice header styling & remove errant text
This commit is contained in:
parent
df4d717763
commit
25bb2ecfc1
8 changed files with 114 additions and 13 deletions
|
@ -240,6 +240,12 @@ public class PublishController : ControllerBase
|
|||
|
||||
oldSlot.MinimumPlayers = Math.Clamp(slot.MinimumPlayers, 1, 4);
|
||||
oldSlot.MaximumPlayers = Math.Clamp(slot.MaximumPlayers, 1, 4);
|
||||
|
||||
// Check if the level has been locked by a moderator to avoid unlocking it
|
||||
if (oldSlot.LockedByModerator)
|
||||
{
|
||||
oldSlot.InitiallyLocked = true;
|
||||
}
|
||||
|
||||
await this.database.SaveChangesAsync();
|
||||
return this.Ok(SlotBase.CreateFromEntity(oldSlot, token));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue