feat: add global-configurations component (#357)
* view global configurations * edit global configuration Fixes: #178
This commit is contained in:
committed by
Abhay Chawla
parent
d0a5123d68
commit
370fc9b481
@@ -75,4 +75,28 @@ export class SystemService {
|
||||
return this.http.post('/codes', code);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} Configurations data.
|
||||
*/
|
||||
getConfigurations(): Observable<any> {
|
||||
return this.http.get('/configurations');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} configurationId Configuration ID of configuration.
|
||||
* @returns {Observable<any>} Configuration.
|
||||
*/
|
||||
getConfiguration(configurationId: string): Observable<any> {
|
||||
return this.http.get(`/configurations/${configurationId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} configurationId Configuration ID of configuration to be updated.
|
||||
* @param {any} configuration Configuration to be updated.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
updateConfiguration(configurationId: string, configuration: any): Observable<any> {
|
||||
return this.http.put(`/configurations/${configurationId}`, configuration);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user