fixing the get device api call

This commit is contained in:
csawatzky 2025-02-28 11:35:50 -06:00
parent 3a953ede85
commit 757b758d98

View file

@ -171,12 +171,12 @@ export default function DeviceProvider(props: PropsWithChildren<Props>) {
let url = pondURL(
"/devices/" +
id +
(as ? "?as=" + as : "") +
"?as=" + as +
(keys ? "&keys=" + keys.toString() : "") +
(types ? "&types=" + types.toString() : ""),
demo
);
return new Promise<AxiosResponse<pond.Device>>((resolve, response) => {
return new Promise<AxiosResponse<pond.Device>>((resolve, reject) => {
get<pond.Device>(url).then(resp => {
resp.data = pond.Device.fromObject(resp.data)
return resolve(resp)