mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
25 lines
727 B
TypeScript
25 lines
727 B
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { SaveSettingsService } from './commands/SaveSettings.service';
|
|
import { ISettingsDTO } from './Settings.types';
|
|
import { GetSettingsService } from './queries/GetSettings.service';
|
|
|
|
@Injectable()
|
|
export class SettingsApplicationService {
|
|
constructor(
|
|
private readonly saveSettingsService: SaveSettingsService,
|
|
private readonly getSettingsService: GetSettingsService,
|
|
) {}
|
|
|
|
/**
|
|
* Saves the given settings.
|
|
* @param {ISettingsDTO} settingsDTO
|
|
*/
|
|
public async saveSettings(settingsDTO: ISettingsDTO) {
|
|
return this.saveSettingsService.saveSettings(settingsDTO);
|
|
}
|
|
|
|
public async getSettings() {
|
|
return this.getSettingsService.execute();
|
|
}
|
|
}
|