mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
aa76551500
commit
f4cb17314d
1 changed files with 2 additions and 14 deletions
|
|
@ -52,20 +52,8 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||||
var device = DeviceManager.GetDeviceForKey(deviceObj.ToString()) as IHasFeedback;
|
var device = DeviceManager.GetDeviceForKey(deviceObj.ToString()) as IHasFeedback;
|
||||||
if (device == null)
|
if (device == null)
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = 200;
|
context.Response.StatusCode = 404;
|
||||||
context.Response.StatusDescription = "OK";
|
context.Response.StatusDescription = "Not Found";
|
||||||
context.Response.ContentType = "application/json";
|
|
||||||
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
|
|
||||||
var resp = new
|
|
||||||
{
|
|
||||||
BoolValues = Array.Empty<object>(),
|
|
||||||
IntValues = Array.Empty<object>(),
|
|
||||||
SerialValues = Array.Empty<object>()
|
|
||||||
};
|
|
||||||
var respJs = JsonConvert.SerializeObject(resp, Formatting.Indented);
|
|
||||||
|
|
||||||
context.Response.Write(respJs, false);
|
|
||||||
|
|
||||||
context.Response.End();
|
context.Response.End();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue