mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 16:08:38 +00:00
Fix /filterResources endpoint
This commit is contained in:
parent
f3c6d4a415
commit
6266d3907b
3 changed files with 3 additions and 6 deletions
|
@ -1,6 +1,4 @@
|
|||
using System.Buffers;
|
||||
using System.IO;
|
||||
using System.IO.Pipelines;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
@ -32,11 +30,11 @@ namespace LBPUnion.ProjectLighthouse.Controllers {
|
|||
if(resourceList == null) return this.BadRequest();
|
||||
|
||||
string resources = resourceList.Resources
|
||||
.Where(FileHelper.ResourceExists)
|
||||
.Where(s => !FileHelper.ResourceExists(s))
|
||||
.Aggregate("", (current, hash) =>
|
||||
current + LbpSerializer.StringElement("resource", hash));
|
||||
|
||||
return this.Ok(resources);
|
||||
return this.Ok(LbpSerializer.StringElement("resources", resources));
|
||||
}
|
||||
|
||||
[HttpGet("r/{hash}")]
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using System.IO;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Types.Files {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System.Xml.Serialization;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Types {
|
||||
[XmlRoot("resource"), XmlType("resources")]
|
||||
[XmlRoot("resources"), XmlType("resources")]
|
||||
public class ResourceList {
|
||||
[XmlElement("resource")]
|
||||
public string[] Resources;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue