2018-03-30 15:30:30 -04:00
|
|
|
import {Injectable} from '@angular/core';
|
|
|
|
import {NetworkService} from '../../model/network/network.service';
|
|
|
|
import {DataBaseConfig} from '../../../../common/config/private/IPrivateConfig';
|
|
|
|
import {AbstractSettingsService} from '../_abstract/abstract.settings.service';
|
|
|
|
import {SettingsService} from '../settings.service';
|
2017-07-08 12:43:42 +02:00
|
|
|
|
|
|
|
@Injectable()
|
2017-07-15 14:27:12 +02:00
|
|
|
export class DatabaseSettingsService extends AbstractSettingsService<DataBaseConfig> {
|
|
|
|
constructor(private _networkService: NetworkService,
|
|
|
|
_settingsService: SettingsService) {
|
2017-07-15 17:29:40 +02:00
|
|
|
super(_settingsService);
|
2017-07-08 12:43:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-07-13 23:39:09 +02:00
|
|
|
public updateSettings(settings: DataBaseConfig): Promise<void> {
|
2018-03-30 15:30:30 -04:00
|
|
|
return this._networkService.putJson('/settings/database', {settings: settings});
|
2017-07-08 12:43:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|