mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-03 18:48:40 +00:00
Merge branch 'main' into lumalivy-main
This commit is contained in:
commit
a9969336dc
3 changed files with 15 additions and 5 deletions
|
@ -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">
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue