From d5d34c5381c757612d6d461b8afc523b46f64bb1 Mon Sep 17 00:00:00 2001 From: glax Date: Thu, 31 Aug 2023 15:41:29 +0200 Subject: [PATCH] Changed return-values of API: NotifcationConnectors/Types and LibraryConnectors/Types --- Tranga/Server.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Tranga/Server.cs b/Tranga/Server.cs index 1ebbaea..0a293f8 100644 --- a/Tranga/Server.cs +++ b/Tranga/Server.cs @@ -171,14 +171,16 @@ public class Server : GlobalBase case "NotificationConnectors": SendResponse(HttpStatusCode.OK, response, notificationConnectors); break; - case "NotificationsConnectors/Types": - SendResponse(HttpStatusCode.OK, response, Enum.GetNames(typeof(NotificationConnector.NotificationManagerType))); + case "NotificationConnectors/Types": + SendResponse(HttpStatusCode.OK, response, + Enum.GetValues().Select(nc => new KeyValuePair((byte)nc, Enum.GetName(nc)))); break; case "LibraryConnectors": SendResponse(HttpStatusCode.OK, response, libraryConnectors); break; case "LibraryConnectors/Types": - SendResponse(HttpStatusCode.OK, response, Enum.GetNames(typeof(LibraryConnector.LibraryType))); + SendResponse(HttpStatusCode.OK, response, + Enum.GetValues().Select(lc => new KeyValuePair((byte)lc, Enum.GetName(lc)))); break; default: SendResponse(HttpStatusCode.BadRequest, response);