diff --git a/ProjectLighthouse/Controllers/EnterLevelController.cs b/ProjectLighthouse/Controllers/EnterLevelController.cs new file mode 100644 index 00000000..778660b3 --- /dev/null +++ b/ProjectLighthouse/Controllers/EnterLevelController.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Mvc; + +namespace ProjectLighthouse.Controllers { + [ApiController] + [Route("LITTLEBIGPLANETPS3_XML/enterLevel")] +// [Produces("text/plain")] + public class EnterLevelController : ControllerBase { + [HttpGet("enterLevel/{id}")] + public IActionResult EnterLevel(string id) { + return this.Ok(); + } + } +} \ No newline at end of file diff --git a/ProjectLighthouse/Controllers/LevelTagsController.cs b/ProjectLighthouse/Controllers/LevelTagsController.cs new file mode 100644 index 00000000..30300974 --- /dev/null +++ b/ProjectLighthouse/Controllers/LevelTagsController.cs @@ -0,0 +1,22 @@ +using System; +using Microsoft.AspNetCore.Mvc; + +namespace ProjectLighthouse.Controllers { + [ApiController] + [Route("LITTLEBIGPLANETPS3_XML/tags")] + [Produces("text/plain")] + public class LevelTagsController : ControllerBase { + [HttpGet] + public IActionResult Get() { + string[] tags = Enum.GetNames(typeof(LevelTags)); + + int i = 0; + foreach(string tag in tags) { + tags[i] = $"TAG_{tag.Replace("_", "-")}"; + i++; + } + + return this.Ok(string.Join(",", tags)); + } + } +} \ No newline at end of file diff --git a/ProjectLighthouse/LevelTags.cs b/ProjectLighthouse/LevelTags.cs new file mode 100644 index 00000000..f9dec7d4 --- /dev/null +++ b/ProjectLighthouse/LevelTags.cs @@ -0,0 +1,80 @@ +namespace ProjectLighthouse { + public enum LevelTags { + Brilliant, + Beautiful, + Funky, + Points_Fest, + Weird, + Tricky, + Short, + Vehicles, + Easy, + Cute, + Quick, + Fun, + Relaxing, + Great, + Speedy, + Race, + Multi_Path, + Machines, + Complex, + Pretty, + Rubbish, + Toys, + Repetitive, + Machinery, + Satisfying, + Braaains, + Fast, + Simple, + Long, + Slow, + Mad, + Hectic, + Creepy, + Perilous, + Empty, + Ingenious, + Lousy, + Frustrating, + Timing, + Boss, + Springy, + Funny, + Musical, + Good, + Hilarious, + Electric, + Puzzler, + Platformer, + Difficult, + Mechanical, + Horizontal, + Splendid, + Fiery, + Swingy, + Single_Path, + Annoying, + Co_op, + Boring, + Moody, + Bubbly, + Nerve_wracking, + Hoists, + Ugly, + Daft, + Ramps, + Secrets, + Floaty, + Artistic, + Competitive, + Gas, + Varied, + Stickers, + Spikes, + Collectables, + Vertical, + Balancing + } +} \ No newline at end of file diff --git a/ProjectLighthouse/Startup.cs b/ProjectLighthouse/Startup.cs index 4c81b4eb..f6f22387 100644 --- a/ProjectLighthouse/Startup.cs +++ b/ProjectLighthouse/Startup.cs @@ -35,6 +35,13 @@ namespace ProjectLighthouse { app.UseDeveloperExceptionPage(); } + app.Use(async (context, next) => { + await next(); + if(context.Response.StatusCode == 404) { + Console.WriteLine($"404: {context.Request.Method} {context.Request.Path}"); + } + }); + app.UseRouting(); app.UseAuthorization();