ProjectLighthouse/ProjectLighthouse.Servers.Website/Types/AutoDiscoverResponse.cs
Henry Asbridge 9258469a1d
Some checks failed
Qodana / qodana (push) Has been cancelled
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Implement refresh autodiscover (#1091)
* Implement refresh autodiscover

* Make record fields required

* Implement checking for the Patchwork user agent (#1090)

* Implement checking for the Patchwork user agent, move logout into standalone method

* Quick fixes (awesome name)

* 403 user at login instead of logging out at /announce

* Move configuration and revert logout changes

* Rework parsing to check against GameVersion enum and game token GameVersion

* Fix logic error

oopsie

* Fix Zaprit suggestions

* Simplify patchwork game version test

* Test patchwork user agent with regex instead

* Fix Qodana warnings

* Fix remaining Qodana warnings

* Implement refresh autodiscover

* Make record fields required

* Update ProjectLighthouse.Servers.Website/Controllers/AutoDiscoverController.cs

Co-authored-by: Josh <josh@slendy.pw>

---------

Co-authored-by: FeTetra <166051662+FeTetra@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2025-06-07 14:01:29 +00:00

19 lines
644 B
C#

using Newtonsoft.Json;
namespace LBPUnion.ProjectLighthouse.Servers.Website.Types;
public record AutoDiscoverResponse
{
[JsonProperty("version")]
public required uint Version { get; set; }
[JsonProperty("serverBrand")]
public required string ServerBrand { get; set; }
[JsonProperty("serverDescription")]
public required string ServerDescription { get; set; }
[JsonProperty("url")]
public required string Url { get; set; }
[JsonProperty("bannerImageUrl")]
public string? BannerImageUrl { get; set; }
[JsonProperty("usesCustomDigestKey")]
public required bool UsesCustomDigestKey { get; set; }
}