Merge branch 'main' into lumalivy-main

This commit is contained in:
jvyden 2021-11-14 23:51:25 -05:00
commit a9969336dc
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
3 changed files with 15 additions and 5 deletions

View file

@ -13,7 +13,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.12"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

View file

@ -36,6 +36,10 @@ namespace LBPUnion.ProjectLighthouse.Controllers
Slot slot = await this.GetSlotFromBody();
if (slot == null) return this.BadRequest(); // if the level cant be parsed then it obviously cant be uploaded
if (string.IsNullOrEmpty(slot.RootLevel)) return this.BadRequest();
if (string.IsNullOrEmpty(slot.ResourceCollection)) slot.ResourceCollection = slot.RootLevel;
// Republish logic
if (slot.SlotId != 0)
{
@ -44,6 +48,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers
if (oldSlot.CreatorId != user.UserId) return this.BadRequest();
}
slot.ResourceCollection += "," + slot.IconHash; // tells LBP to upload icon after we process resources here
string resources = slot.Resources.Where
(hash => !FileHelper.ResourceExists(hash))
.Aggregate("", (current, hash) => current + LbpSerializer.StringElement("resource", hash));

View file

@ -10,13 +10,13 @@
<ItemGroup>
<PackageReference Include="BCrypt.Net-Next" Version="4.0.2"/>
<PackageReference Include="Kettu" Version="1.2.1"/>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.12"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.12"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.12">
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.2"/>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0"/>
</ItemGroup>
<ItemGroup>