API added POST
NotificationConnectors/Reset LibraryConnectors/Reset
This commit is contained in:
parent
1cce0f204e
commit
db53e2156b
@ -528,6 +528,16 @@ public class Server : GlobalBase
|
||||
notificationConnector.SendNotification("Tranga Test", "This is Test-Notification.");
|
||||
SendResponse(HttpStatusCode.Accepted, response);
|
||||
break;
|
||||
case "NotificationConnectors/Reset":
|
||||
if (!requestVariables.TryGetValue("notificationConnector", out notificationConnectorStr) ||
|
||||
!Enum.TryParse(notificationConnectorStr, out notificationConnectorType))
|
||||
{
|
||||
SendResponse(HttpStatusCode.BadRequest, response);
|
||||
break;
|
||||
}
|
||||
DeleteNotificationConnector(notificationConnectorType);
|
||||
SendResponse(HttpStatusCode.Accepted, response);
|
||||
break;
|
||||
case "LibraryConnectors/Update":
|
||||
if (!requestVariables.TryGetValue("libraryConnector", out libraryConnectorStr) ||
|
||||
!Enum.TryParse(libraryConnectorStr, out libraryConnectorType))
|
||||
@ -600,6 +610,16 @@ public class Server : GlobalBase
|
||||
libraryConnector.UpdateLibrary();
|
||||
SendResponse(HttpStatusCode.Accepted, response);
|
||||
break;
|
||||
case "LibraryConnectors/Reset":
|
||||
if (!requestVariables.TryGetValue("libraryConnector", out libraryConnectorStr) ||
|
||||
!Enum.TryParse(libraryConnectorStr, out libraryConnectorType))
|
||||
{
|
||||
SendResponse(HttpStatusCode.BadRequest, response);
|
||||
break;
|
||||
}
|
||||
DeleteLibraryConnector(libraryConnectorType);
|
||||
SendResponse(HttpStatusCode.Accepted, response);
|
||||
break;
|
||||
default:
|
||||
SendResponse(HttpStatusCode.BadRequest, response);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user