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);