chore: update packages

This commit is contained in:
CyberL1 2024-07-06 12:50:51 +02:00
parent c1353de565
commit 50042e96ad
2 changed files with 16 additions and 17 deletions

View File

@ -14,8 +14,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetEnv" Version="3.0.0" /> <PackageReference Include="DotNetEnv" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.5"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>

View File

@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR.Protocol;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes; using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data; using Minecraft_Realms_Emulator.Data;
@ -667,28 +666,28 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
[CheckActiveSubscription] [CheckActiveSubscription]
public async Task<ActionResult<bool>> Open(int wId) public async Task<ActionResult<bool>> Open(int wId)
{ {
var worlds = await _context.Worlds.ToListAsync(); var worlds = await _context.Worlds.ToListAsync();
var world = worlds.Find(w => w.Id == wId); var world = worlds.Find(w => w.Id == wId);
new DockerHelper(world).StartServer(); new DockerHelper(world).StartServer();
world.State = nameof(StateEnum.OPEN); world.State = nameof(StateEnum.OPEN);
_context.SaveChanges(); _context.SaveChanges();
var connection = _context.Connections.FirstOrDefault(c => c.World.Id == wId); var connection = _context.Connections.FirstOrDefault(c => c.World.Id == wId);
var query = new MinecraftServerQuery().Query(connection.Address); var query = new MinecraftServerQuery().Query(connection.Address);
while (query == null) while (query == null)
{ {
await Task.Delay(1000); await Task.Delay(1000);
query = new MinecraftServerQuery().Query(connection.Address); query = new MinecraftServerQuery().Query(connection.Address);
}
return Ok(true);
} }
return Ok(true);
}
[HttpPut("{wId}/close")] [HttpPut("{wId}/close")]
[CheckForWorld] [CheckForWorld]
[CheckRealmOwner] [CheckRealmOwner]