From 802eeb8d397c43e6f60b8c8b30f43c5296c89ee4 Mon Sep 17 00:00:00 2001 From: Ske Date: Wed, 10 Jul 2019 00:23:41 +0200 Subject: [PATCH] Version API endpoints --- PluralKit.API/Controllers/MemberController.cs | 1 + PluralKit.API/Controllers/SystemController.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PluralKit.API/Controllers/MemberController.cs b/PluralKit.API/Controllers/MemberController.cs index e2d4b678..ccdaea91 100644 --- a/PluralKit.API/Controllers/MemberController.cs +++ b/PluralKit.API/Controllers/MemberController.cs @@ -7,6 +7,7 @@ namespace PluralKit.API.Controllers { [ApiController] [Route("m")] + [Route("v1/m")] public class MemberController: ControllerBase { private MemberStore _members; diff --git a/PluralKit.API/Controllers/SystemController.cs b/PluralKit.API/Controllers/SystemController.cs index cfa36303..65cb575b 100644 --- a/PluralKit.API/Controllers/SystemController.cs +++ b/PluralKit.API/Controllers/SystemController.cs @@ -30,6 +30,7 @@ namespace PluralKit.API.Controllers [ApiController] [Route("s")] + [Route("v1/s")] public class SystemController : ControllerBase { private SystemStore _systems; @@ -68,7 +69,7 @@ namespace PluralKit.API.Controllers [HttpGet("{hid}/switches")] public async Task>> GetSwitches(string hid, [FromQuery(Name = "before")] Instant? before) { - if (before == default(Instant)) before = SystemClock.Instance.GetCurrentInstant(); + if (before == null) before = SystemClock.Instance.GetCurrentInstant(); var system = await _systems.GetByHid(hid); if (system == null) return NotFound("System not found.");