From f5c096347391f177a82b3a0f66d2c2950e8beab5 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Tue, 23 Apr 2024 17:58:07 +0200 Subject: [PATCH] chore: remove function --- MyMcRealms/Controllers/WorldsController.cs | 3 +-- MyMcRealms/MyMcAPI/Wrapper.cs | 15 +-------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/MyMcRealms/Controllers/WorldsController.cs b/MyMcRealms/Controllers/WorldsController.cs index b27cd47..9d71b75 100644 --- a/MyMcRealms/Controllers/WorldsController.cs +++ b/MyMcRealms/Controllers/WorldsController.cs @@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore; using MyMcRealms.Attributes; using MyMcRealms.Data; using MyMcRealms.Entities; -using MyMcRealms.MyMcAPI; using MyMcRealms.MyMcAPI.Responses; using MyMcRealms.Requests; using MyMcRealms.Responses; @@ -227,7 +226,7 @@ namespace MyMcRealms.Controllers public async Task> Join(int wId) { AllServersResponse AllServers = await new MyMcAPI.MyMcAPI(Environment.GetEnvironmentVariable("MYMC_API_KEY")).GetAllServers(); - + ConnectionResponse connection = new() { Address = AllServers.Servers[wId].Connect, diff --git a/MyMcRealms/MyMcAPI/Wrapper.cs b/MyMcRealms/MyMcAPI/Wrapper.cs index 2b8ce1a..5ece156 100644 --- a/MyMcRealms/MyMcAPI/Wrapper.cs +++ b/MyMcRealms/MyMcAPI/Wrapper.cs @@ -13,26 +13,13 @@ namespace MyMcRealms.MyMcAPI httpClient.BaseAddress = new Uri(ApiUrl); } - public async Task GetHello() - { - HelloResponse response = await httpClient.GetFromJsonAsync("hello"); - - if (response == null) - { - Console.WriteLine($"error while doing GET /hello"); - return null; - } - - return response; - } - public async Task GetAllServers() { AllServersResponse response = await httpClient.GetFromJsonAsync($"list_all_servers/{Environment.GetEnvironmentVariable("MYMC_SERVER_LIST_KEY")}"); if (response == null) { - Console.WriteLine("error while doing GET/list_all_servers"); + Console.WriteLine("error while doing GET /list_all_servers"); return null; }