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>
<PackageReference Include="DotNetEnv" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.5">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

View File

@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR.Protocol;
using Microsoft.EntityFrameworkCore;
using Minecraft_Realms_Emulator.Attributes;
using Minecraft_Realms_Emulator.Data;
@ -667,28 +666,28 @@ namespace Minecraft_Realms_Emulator.Modes.Realms.Controllers
[CheckActiveSubscription]
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 query = new MinecraftServerQuery().Query(connection.Address);
var connection = _context.Connections.FirstOrDefault(c => c.World.Id == wId);
var query = new MinecraftServerQuery().Query(connection.Address);
while (query == null)
{
await Task.Delay(1000);
query = new MinecraftServerQuery().Query(connection.Address);
}
return Ok(true);
while (query == null)
{
await Task.Delay(1000);
query = new MinecraftServerQuery().Query(connection.Address);
}
return Ok(true);
}
[HttpPut("{wId}/close")]
[CheckForWorld]
[CheckRealmOwner]