refactor: remove asp.net versioning

This commit is contained in:
spiral
2022-01-19 19:25:04 -05:00
parent 1626e0f548
commit eb4f53c69e
14 changed files with 119 additions and 36 deletions

View File

@@ -7,8 +7,7 @@ using PluralKit.Core;
namespace PluralKit.API;
[ApiController]
[ApiVersion("1.0")]
[Route("v{version:apiVersion}/msg")]
[Route("v1")]
public class MessageController: ControllerBase
{
private readonly IDatabase _db;
@@ -20,7 +19,7 @@ public class MessageController: ControllerBase
_db = db;
}
[HttpGet("{mid}")]
[HttpGet("msg/{mid}")]
public async Task<ActionResult<JObject>> GetMessage(ulong mid)
{
var msg = await _db.Execute(c => _repo.GetMessage(c, mid));