mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 10:08:39 +00:00
Merge branch 'refs/heads/main' into digest-refactor
# Conflicts: # ProjectLighthouse.Servers.GameServer/Controllers/Slots/ReviewController.cs
This commit is contained in:
commit
0e0a900f67
86 changed files with 1477 additions and 170 deletions
|
@ -114,6 +114,9 @@ public class CommentController : GameController
|
|||
{
|
||||
GameTokenEntity token = this.GetToken();
|
||||
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
GameComment? comment = await this.DeserializeBody<GameComment>();
|
||||
if (comment?.Message == null) return this.BadRequest();
|
||||
|
||||
|
@ -154,6 +157,9 @@ public class CommentController : GameController
|
|||
{
|
||||
GameTokenEntity token = this.GetToken();
|
||||
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
if ((slotId == 0 || SlotHelper.IsTypeInvalid(slotType)) == (username == null)) return this.BadRequest();
|
||||
|
||||
CommentEntity? comment = await this.database.Comments.FirstOrDefaultAsync(c => c.CommentId == commentId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue