Browse Source

Code review: device.service beautify

pull/3811/head
deaflynx 6 years ago
parent
commit
40feb8f6ec
  1. 9
      ui-ngx/src/app/core/http/device.service.ts

9
ui-ngx/src/app/core/http/device.service.ts

@ -155,11 +155,14 @@ export class DeviceService {
return this.http.delete(`/api/customer/device/${deviceName}/claim`, defaultHttpOptionsFromConfig(config)); return this.http.delete(`/api/customer/device/${deviceName}/claim`, defaultHttpOptionsFromConfig(config));
} }
public assignDeviceToEdge(edgeId: string, deviceId: string, config?: RequestConfig): Observable<Device> { public assignDeviceToEdge(edgeId: string, deviceId: string,
return this.http.post<Device>(`/api/edge/${edgeId}/device/${deviceId}`, defaultHttpOptionsFromConfig(config)); config?: RequestConfig): Observable<Device> {
return this.http.post<Device>(`/api/edge/${edgeId}/device/${deviceId}`,
defaultHttpOptionsFromConfig(config));
} }
public unassignDeviceFromEdge(edgeId: string, deviceId: string, config?: RequestConfig) { public unassignDeviceFromEdge(edgeId: string, deviceId: string,
config?: RequestConfig) {
return this.http.delete(`/api/edge/${edgeId}/device/${deviceId}`, return this.http.delete(`/api/edge/${edgeId}/device/${deviceId}`,
defaultHttpOptionsFromConfig(config)); defaultHttpOptionsFromConfig(config));
} }

Loading…
Cancel
Save