Change /filterResources to send back all resources

This commit is contained in:
jvyden 2021-10-10 19:49:14 -04:00
commit 06b89fec50
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using ProjectLighthouse.Serialization; using ProjectLighthouse.Serialization;
using IOFile = System.IO.File; using IOFile = System.IO.File;
@ -9,12 +10,16 @@ namespace ProjectLighthouse.Controllers {
[Route("LITTLEBIGPLANETPS3_XML/")] [Route("LITTLEBIGPLANETPS3_XML/")]
[Produces("text/xml")] [Produces("text/xml")]
public class ResourcesController : ControllerBase { public class ResourcesController : ControllerBase {
[HttpPost("filterResources")]
[HttpPost("showModerated")] [HttpPost("showModerated")]
public IActionResult ShowModerated() { public IActionResult ShowModerated() {
return this.Ok(LbpSerializer.BlankElement("resources")); return this.Ok(LbpSerializer.BlankElement("resources"));
} }
[HttpPost("filterResources")]
public async Task<IActionResult> FilterResources() {
return this.Ok(await new StreamReader(Request.Body).ReadToEndAsync());
}
[HttpGet("r/{hash}")] [HttpGet("r/{hash}")]
public IActionResult GetResource(string hash) { public IActionResult GetResource(string hash) {
string path = Path.Combine(Environment.CurrentDirectory, "r", hash); string path = Path.Combine(Environment.CurrentDirectory, "r", hash);