From 12cebb629e7bad910e6e9ed718c7aaeb1d86c807 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 24 Nov 2024 18:21:20 -0600 Subject: handle Noop --- src/slskd/Events/API/EventsController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/slskd/Events/API/EventsController.cs b/src/slskd/Events/API/EventsController.cs index 29845e8c..60b554b0 100644 --- a/src/slskd/Events/API/EventsController.cs +++ b/src/slskd/Events/API/EventsController.cs @@ -98,7 +98,7 @@ public class EventsController : ControllerBase /// Raises a sample event of the specified . /// /// The type of event to raise. - /// A string used to disambiguate generated events. + /// An optional string used to disambiguate generated events. /// The randomly generated event that was raised. /// If the offset is less than zero, or if the limit is less than or equal to zero. /// Authentication credentials are omitted. @@ -133,6 +133,7 @@ public class EventsController : ControllerBase { EventType.DownloadFileComplete => new DownloadFileCompleteEvent { LocalFilename = $"{d}local.file", RemoteFilename = $"{d}remote.file", Transfer = null }, EventType.DownloadDirectoryComplete => new DownloadDirectoryCompleteEvent { LocalDirectoryName = $"{d}local.directory", RemoteDirectoryName = $"{d}remote.directory", Username = $"{d}username" }, + EventType.Noop => new NoopEvent(), _ => throw new SlskdException($"Event type {eventType} is an enum member but is not handled. Please submit an issue on GitHub."), }; -- cgit v1.2.3