You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Decrease IEnumerable usage
This will reduce the risk of multiple enumeration crashes and probably improve performance
* Remove the rest unnecessary
* Implement back direct enumerable returns
* Change controller return types to iasyncenumerable where applicable
* Remove async on endpoint
* Revert and adjust some changes to array
* Friendship ended with array, we now like IReadOnlyList
* More
* Remove async keyword on endpoints returning IAsyncEnumerable
---------
Co-authored-by: LucHeart <luc@luc.cat>
Copy file name to clipboardExpand all lines: API/Controller/Shockers/ControlShockerController.cs
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
usingSystem.Net;
2
-
usingSystem.Net.Mime;
1
+
usingSystem.Net.Mime;
3
2
usingAsp.Versioning;
4
3
usingMicrosoft.AspNetCore.Mvc;
5
4
usingMicrosoft.AspNetCore.SignalR;
@@ -11,7 +10,6 @@
11
10
usingOpenShock.Common.Models;
12
11
usingOpenShock.Common.Problems;
13
12
usingOpenShock.Common.Services.RedisPubSub;
14
-
usingOpenShock.Common.Utils;
15
13
16
14
namespaceOpenShock.API.Controller.Shockers;
17
15
@@ -65,7 +63,7 @@ public async Task<IActionResult> SendControl(
65
63
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status412PreconditionFailed,MediaTypeNames.Application.ProblemJson)]// Shocker is paused
66
64
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status403Forbidden,MediaTypeNames.Application.ProblemJson)]// You don't have permission to control this shocker
0 commit comments