fixing the get device api call
This commit is contained in:
parent
3a953ede85
commit
757b758d98
1 changed files with 2 additions and 2 deletions
|
|
@ -171,12 +171,12 @@ export default function DeviceProvider(props: PropsWithChildren<Props>) {
|
||||||
let url = pondURL(
|
let url = pondURL(
|
||||||
"/devices/" +
|
"/devices/" +
|
||||||
id +
|
id +
|
||||||
(as ? "?as=" + as : "") +
|
"?as=" + as +
|
||||||
(keys ? "&keys=" + keys.toString() : "") +
|
(keys ? "&keys=" + keys.toString() : "") +
|
||||||
(types ? "&types=" + types.toString() : ""),
|
(types ? "&types=" + types.toString() : ""),
|
||||||
demo
|
demo
|
||||||
);
|
);
|
||||||
return new Promise<AxiosResponse<pond.Device>>((resolve, response) => {
|
return new Promise<AxiosResponse<pond.Device>>((resolve, reject) => {
|
||||||
get<pond.Device>(url).then(resp => {
|
get<pond.Device>(url).then(resp => {
|
||||||
resp.data = pond.Device.fromObject(resp.data)
|
resp.data = pond.Device.fromObject(resp.data)
|
||||||
return resolve(resp)
|
return resolve(resp)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue