feat: add centers action (activate) (#1085)

Fixes: #1084
This commit is contained in:
Muskan Khedia
2020-07-14 10:42:53 +05:30
committed by GitHub
parent 6c081eb724
commit f861e466bf
15 changed files with 276 additions and 37 deletions
+11
View File
@@ -176,4 +176,15 @@ export class CentersService {
return this.http.delete(`/datatables/${datatableName}/${centerId}`, { params: httpParams });
}
/**
* @param {string} centerId Center Id
* @param {string} command Command
* @param {any} data Data
* @returns {Observable<any>}
*/
executeCenterActionCommand(centerId: string, command: string, data: any): Observable<any> {
const httpParams = new HttpParams().set('command', command);
return this.http.post(`/centers/${centerId}`, data, { params: httpParams });
}
}