diff --git a/ProjectLighthouse/Controllers/ClientConfigurationController.cs b/ProjectLighthouse/Controllers/ClientConfigurationController.cs index 6d684d3d..c735cfa0 100644 --- a/ProjectLighthouse/Controllers/ClientConfigurationController.cs +++ b/ProjectLighthouse/Controllers/ClientConfigurationController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using ProjectLighthouse.Serialization; +using ProjectLighthouse.Types; namespace ProjectLighthouse.Controllers { [ApiController] @@ -12,8 +13,9 @@ namespace ProjectLighthouse.Controllers { } [HttpGet("t_conf")] + [Produces("text/json")] public IActionResult TConf() { - return this.Ok(); + return this.Ok("[{\"StatusCode\":200}]"); } [HttpGet("farc_hashes")] @@ -22,8 +24,14 @@ namespace ProjectLighthouse.Controllers { } [HttpGet("privacySettings")] + [Produces("text/xml")] public IActionResult PrivacySettings() { - return this.Ok(); + PrivacySettings ps = new() { + LevelVisibility = "unset", + ProfileVisibility = "unset" + }; + + return this.Ok(ps.Serialize()); } } } \ No newline at end of file diff --git a/ProjectLighthouse/Controllers/SlotsController.cs b/ProjectLighthouse/Controllers/SlotsController.cs index 0378eb3e..02ba40a8 100644 --- a/ProjectLighthouse/Controllers/SlotsController.cs +++ b/ProjectLighthouse/Controllers/SlotsController.cs @@ -25,9 +25,16 @@ namespace ProjectLighthouse.Controllers { return this.Ok(slot.Serialize()); } + [HttpGet("slots/lolcatftw/{username}")] + public IActionResult SlotsLolCat(string username) { + string response = Enumerable.Aggregate(new Database().Slots, string.Empty, (current, slot) => current + slot.Serialize()); + + return this.Ok(LbpSerializer.TaggedStringElement("slots", response, "total", 1)); + } + [HttpPost("showModerated")] public IActionResult ShowModerated() { - return this.Ok(); + return this.Ok(""); } } } \ No newline at end of file diff --git a/ProjectLighthouse/Controllers/UserController.cs b/ProjectLighthouse/Controllers/UserController.cs index a60d1a7f..fab353d8 100644 --- a/ProjectLighthouse/Controllers/UserController.cs +++ b/ProjectLighthouse/Controllers/UserController.cs @@ -109,8 +109,9 @@ namespace ProjectLighthouse.Controllers { } [HttpPost("match")] + [Produces("text/json")] public IActionResult Match() { - return this.Ok(); + return this.Ok("[{\"StatusCode\":200}]"); } } } \ No newline at end of file diff --git a/ProjectLighthouse/Types/PrivacySettings.cs b/ProjectLighthouse/Types/PrivacySettings.cs new file mode 100644 index 00000000..2c73c1b6 --- /dev/null +++ b/ProjectLighthouse/Types/PrivacySettings.cs @@ -0,0 +1,15 @@ +using ProjectLighthouse.Serialization; + +namespace ProjectLighthouse.Types { + public class PrivacySettings { + public string LevelVisibility { get; set; } + public string ProfileVisibility { get; set; } + + public string Serialize() { + return LbpSerializer.StringElement("privacySettings", + LbpSerializer.StringElement("levelVisibility", LevelVisibility) + + LbpSerializer.StringElement("profileVisibility", ProfileVisibility) + ); + } + } +} \ No newline at end of file