mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-24 15:18:20 -05:00
Move worlds/v1/{wId}/join/pc under WorldsController.cs
This commit is contained in:
parent
3554314302
commit
8a82279ef2
@ -1,26 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Minecraft_Realms_Emulator.Data;
|
||||
using Minecraft_Realms_Emulator.Entities;
|
||||
|
||||
namespace Minecraft_Realms_Emulator.Controllers
|
||||
{
|
||||
[Route("worlds/v1/{worldId}/join/pc")]
|
||||
[ApiController]
|
||||
public class JoinController : ControllerBase
|
||||
{
|
||||
private readonly DataContext _context;
|
||||
|
||||
public JoinController(DataContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
[HttpGet()]
|
||||
public ActionResult<Connection> Join(int worldId)
|
||||
{
|
||||
var connection = _context.Connections.FirstOrDefault(x => x.World.Id == worldId);
|
||||
|
||||
return Ok(connection);
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Minecraft_Realms_Emulator.Data;
|
||||
using Minecraft_Realms_Emulator.Entities;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace Minecraft_Realms_Emulator.Controllers
|
||||
{
|
||||
@ -191,5 +190,13 @@ namespace Minecraft_Realms_Emulator.Controllers
|
||||
|
||||
return Ok(worldBackups);
|
||||
}
|
||||
|
||||
[HttpGet("v1/{wId}/join/pc")]
|
||||
public ActionResult<Connection> Join(int wId)
|
||||
{
|
||||
var connection = _context.Connections.FirstOrDefault(x => x.World.Id == wId);
|
||||
|
||||
return Ok(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user