mirror of
https://github.com/CyberL1/MyMcRealms.git
synced 2024-12-24 05:18:23 -05:00
feat: custom errors
This commit is contained in:
parent
ec4a9c286b
commit
55986afcf5
@ -105,5 +105,11 @@ namespace MyMcRealms.Controllers
|
||||
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
[HttpDelete("{wId}")]
|
||||
public ActionResult<string> LeaveRealms(int wId)
|
||||
{
|
||||
return BadRequest("You wish lmao");
|
||||
}
|
||||
}
|
||||
}
|
17
MyMcRealms/Controllers/SubscriptionsController.cs
Normal file
17
MyMcRealms/Controllers/SubscriptionsController.cs
Normal 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 :(");
|
||||
}
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user