refactor: added 400 bad request responses

This commit is contained in:
jdevito
2023-02-01 12:22:52 -06:00
parent 1c1eabcef6
commit a3346d5ef4
7 changed files with 68 additions and 102 deletions

View File

@@ -54,5 +54,22 @@ namespace PepperDash.Essentials.Core.Web
JoinCapabilities = joinData.Value.Metadata.JoinCapabilities.ToString()
};
}
public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device)
{
var kp = new KeyValuePair<string, DeviceFactoryWrapper>(key, device);
return MapDeviceTypeToObject(kp);
}
public static object MapDeviceTypeToObject(KeyValuePair<string, DeviceFactoryWrapper> device)
{
return new
{
Type = device.Key,
Description = device.Value.Description,
CType = device.Value.CType == null ? "---": device.Value.CType.ToString()
};
}
}
}