diff --git a/Minecraft-Realms-Emulator/Controllers/SubscriptionsController.cs b/Minecraft-Realms-Emulator/Controllers/SubscriptionsController.cs index ec6c542..74892a8 100644 --- a/Minecraft-Realms-Emulator/Controllers/SubscriptionsController.cs +++ b/Minecraft-Realms-Emulator/Controllers/SubscriptionsController.cs @@ -16,13 +16,13 @@ namespace Minecraft_Realms_Emulator.Controllers _context = context; } [HttpGet("{id}")] - public async Task> Get(int id) + public async Task> Get(int id) { var world = await _context.Worlds.Include(w => w.Subscription).FirstOrDefaultAsync(w => w.Id == id); if (world?.Subscription == null) return NotFound("Subscription not found"); - var sub = new Subscription + var sub = new SubscriptionResponse { StartDate = ((DateTimeOffset)world.Subscription.StartDate).ToUnixTimeMilliseconds(), DaysLeft = ((DateTimeOffset)world.Subscription.StartDate.AddDays(30) - DateTime.Today).Days, diff --git a/Minecraft-Realms-Emulator/Responses/Subscription.cs b/Minecraft-Realms-Emulator/Responses/SubscriptionResponse.cs similarity index 84% rename from Minecraft-Realms-Emulator/Responses/Subscription.cs rename to Minecraft-Realms-Emulator/Responses/SubscriptionResponse.cs index 3b02630..59fd82f 100644 --- a/Minecraft-Realms-Emulator/Responses/Subscription.cs +++ b/Minecraft-Realms-Emulator/Responses/SubscriptionResponse.cs @@ -1,6 +1,6 @@ namespace Minecraft_Realms_Emulator.Responses { - public class Subscription + public class SubscriptionResponse { public long StartDate { get; set; } public int DaysLeft { get; set; }