1
0
mirror of https://github.com/CyberL1/MyMcRealms.git synced 2024-09-16 15:02:53 -04:00

feat: custom errors

This commit is contained in:
CyberL1 2024-05-18 11:17:21 +02:00
parent ec4a9c286b
commit 55986afcf5
3 changed files with 47 additions and 0 deletions

View File

@ -105,5 +105,11 @@ namespace MyMcRealms.Controllers
return Ok(true);
}
[HttpDelete("{wId}")]
public ActionResult<string> LeaveRealms(int wId)
{
return BadRequest("You wish lmao");
}
}
}

View File

@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using MyMcRealms.Attributes;
namespace Minecraft_Realms_Emulator.Controllers
{
[Route("[controller]")]
[ApiController]
[RequireMinecraftCookie]
public class SubscriptionsController : ControllerBase
{
[HttpGet("{id}")]
public ActionResult<string> GetSubscription(int id)
{
return BadRequest("No subscription for you :(");
}
}
}

View File

@ -131,6 +131,18 @@ namespace MyMcRealms.Controllers
return Ok(response);
}
[HttpPost("{wId}")]
public ActionResult<string> UpdateRealms(int wId)
{
return BadRequest("You can change the MOTD trough server.properties file");
}
[HttpPost("{wId}/reset")]
public ActionResult<string> ChangeSlot(int id)
{
return BadRequest("lol nice try");
}
[HttpPut("{id}/open")]
public async Task<ActionResult<bool>> Open(int id)
{
@ -161,6 +173,18 @@ namespace MyMcRealms.Controllers
return Ok(true);
}
[HttpPost("{wId}/slot/{sId}")]
public ActionResult<string> UpdateSlot(int wId, int sId)
{
return BadRequest("no.");
}
[HttpGet("{wId}/slot/{sId}/download")]
public ActionResult<string> GetBackups(int wId, int sId)
{
return BadRequest("Wouldn't it be nice if you could download your world to singleplayer? Well I think that too");
}
[HttpGet("v1/{wId}/join/pc")]
public async Task<ActionResult<ConnectionResponse>> Join(int wId)
{