mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-13 00:31:28 +00:00
Improve input validation for story level moderation
This commit is contained in:
parent
f965be88b7
commit
5c66b0f713
2 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ public class ModerationPageController : ControllerBase
|
|||
}
|
||||
|
||||
[HttpPost("findStoryLevel")]
|
||||
public async Task<IActionResult> FindStorySlot([FromForm] int placeholderSlotId)
|
||||
public async Task<IActionResult> FindStorySlot([FromForm] int? placeholderSlotId)
|
||||
{
|
||||
UserEntity? user = this.database.UserFromWebRequest(this.Request);
|
||||
if (user == null) return this.Redirect("~/login");
|
||||
|
@ -30,6 +30,6 @@ public class ModerationPageController : ControllerBase
|
|||
.Select(s => s.SlotId)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
return this.Redirect(slotId == 0 ? "~/" : $"~/slot/{slotId}");
|
||||
return this.Redirect(slotId == 0 ? "~/moderation" : $"~/slot/{slotId}");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue