Merge main into mod-panel

This commit is contained in:
jvyden 2022-06-10 04:01:06 -04:00
commit b2e6f25265
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
38 changed files with 468 additions and 139 deletions

View file

@ -130,7 +130,7 @@ public class LoginController : ControllerBase
new LoginResult
{
AuthTicket = "MM_AUTH=" + token.UserToken,
LbpEnvVer = ServerStatics.ServerName,
ServerBrand = VersionHelper.FullVersion,
}.Serialize()
);
}

View file

@ -86,9 +86,9 @@ public class PublishController : ControllerBase
if (slot.Location == null) return this.BadRequest();
if (slot.Description.Length > 200) return this.BadRequest();
if (slot.Description.Length > 500) return this.BadRequest();
if (slot.Name.Length > 100) return this.BadRequest();
if (slot.Name.Length > 64) return this.BadRequest();
if (slot.Resources.Any(resource => !FileHelper.ResourceExists(resource)))
{

View file

@ -96,7 +96,7 @@ public class ReviewController : ControllerBase
Review? newReview = await this.getReviewFromBody();
if (newReview == null) return this.BadRequest();
if (newReview.Text.Length > 100) return this.BadRequest();
if (newReview.Text.Length > 512) return this.BadRequest();
Review? review = await this.database.Reviews.FirstOrDefaultAsync(r => r.SlotId == slotId && r.ReviewerId == user.UserId);