This commit is contained in:
Archi
2024-01-25 23:34:58 +01:00
parent 109b307d0f
commit cc28d7520e

View File

@@ -19,7 +19,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Collections.Generic;
using System.Net;
using ArchiSteamFarm.IPC.Responses;
@@ -33,9 +32,5 @@ namespace ArchiSteamFarm.IPC.Controllers.Api;
public sealed class PluginsController : ArchiController {
[HttpGet]
[ProducesResponseType<GenericResponse<IReadOnlyCollection<IPlugin>>>((int) HttpStatusCode.OK)]
public ActionResult<GenericResponse<IReadOnlyCollection<IPlugin>>> PluginsGet() {
IReadOnlyCollection<IPlugin> activePlugins = PluginsCore.ActivePlugins ?? (IReadOnlyCollection<IPlugin>) Array.Empty<IPlugin>();
return Ok(new GenericResponse<IReadOnlyCollection<IPlugin>>(activePlugins));
}
public ActionResult<GenericResponse<IReadOnlyCollection<IPlugin>>> PluginsGet() => Ok(new GenericResponse<IReadOnlyCollection<IPlugin>>(PluginsCore.ActivePlugins));
}