Добавлена модель основной конфигураци
This commit is contained in:
parent
a49f89bf97
commit
de05a86f59
2 changed files with 13 additions and 2 deletions
|
|
@ -2,12 +2,13 @@ import RedmineIssueEventEmitterConfigLoader from '@app/event-emitter/configs/mai
|
|||
import { readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
import { parse } from 'jsonc-parser';
|
||||
import { AppConfig } from 'src/models/app-config.model';
|
||||
|
||||
const redmineIssueEventEmitterConfig = RedmineIssueEventEmitterConfigLoader();
|
||||
|
||||
let appConfig;
|
||||
let appConfig: AppConfig;
|
||||
|
||||
export default () => {
|
||||
export default (): AppConfig => {
|
||||
if (appConfig) {
|
||||
return appConfig;
|
||||
}
|
||||
|
|
|
|||
10
src/models/app-config.model.ts
Normal file
10
src/models/app-config.model.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { MainConfigModel } from '@app/event-emitter/models/main-config-model';
|
||||
|
||||
export type AppConfig = {
|
||||
redmineIssueEventEmitterConfig: MainConfigModel;
|
||||
couchDb: {
|
||||
dbs: {
|
||||
changes: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
Reference in a new issue