control device
This commit is contained in:
@@ -50,4 +50,14 @@ export class DeviceService {
|
||||
});
|
||||
return this.http.get<any>(url, { headers });
|
||||
}
|
||||
|
||||
deviceSwitch(data): Observable<any> {
|
||||
const endpoint = `/devices`;
|
||||
const url = `${BASE_URL}${endpoint}/device-switch`;
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
"x-api-key": "j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT",
|
||||
});
|
||||
return this.http.post<any>(url, data, { headers });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user