Merge branch 'main' into mod-panel

This commit is contained in:
jvyden 2022-07-27 16:55:16 -04:00
commit cc7022cf48
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
93 changed files with 2379 additions and 1426 deletions

View file

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

View file

@ -2,6 +2,7 @@
using System.Text.Json;
using System.Xml.Serialization;
using LBPUnion.ProjectLighthouse.Administration.Reports;
using LBPUnion.ProjectLighthouse.Configuration;
using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
using LBPUnion.ProjectLighthouse.Types;
@ -45,6 +46,13 @@ public class ReportController : ControllerBase
this.database.Reports.Add(report);
await this.database.SaveChangesAsync();
await WebhookHelper.SendWebhook(
title: "New grief report",
description: $"Submitted by {user.Username}\n" +
$"To view it, click [here]({ServerConfiguration.Instance.ExternalUrl}/admin/report/{report.ReportId}).",
dest: WebhookHelper.WebhookDestination.Moderation
);
return this.Ok();
}