Merge branch 'main' of github.com:ghostfolio/ghostfolio
All checks were successful
Docker image CD / build_and_push (push) Successful in 22m41s
All checks were successful
Docker image CD / build_and_push (push) Successful in 22m41s
This commit is contained in:
commit
92fbf33032
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added the asset profile count per data provider to the endpoint `GET api/v1/admin`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Improved the language localization for Catalan (`ca`)
|
- Improved the language localization for Catalan (`ca`)
|
||||||
|
@ -143,15 +143,30 @@ export class AdminService {
|
|||||||
this.countUsersWithAnalytics()
|
this.countUsersWithAnalytics()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const dataProviders = await Promise.all(
|
||||||
|
dataSources.map(async (dataSource) => {
|
||||||
|
const dataProviderInfo = this.dataProviderService
|
||||||
|
.getDataProvider(dataSource)
|
||||||
|
.getDataProviderInfo();
|
||||||
|
|
||||||
|
const assetProfileCount = await this.prismaService.symbolProfile.count({
|
||||||
|
where: {
|
||||||
|
dataSource
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
...dataProviderInfo,
|
||||||
|
assetProfileCount
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
dataProviders,
|
||||||
settings,
|
settings,
|
||||||
transactionCount,
|
transactionCount,
|
||||||
userCount,
|
userCount,
|
||||||
dataProviders: dataSources.map((dataSource) => {
|
|
||||||
return this.dataProviderService
|
|
||||||
.getDataProvider(dataSource)
|
|
||||||
.getDataProviderInfo();
|
|
||||||
}),
|
|
||||||
version: environment.version
|
version: environment.version
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { DataProviderInfo } from './data-provider-info.interface';
|
import { DataProviderInfo } from './data-provider-info.interface';
|
||||||
|
|
||||||
export interface AdminData {
|
export interface AdminData {
|
||||||
dataProviders: DataProviderInfo[];
|
dataProviders: (DataProviderInfo & { assetProfileCount: number })[];
|
||||||
settings: { [key: string]: boolean | object | string | string[] };
|
settings: { [key: string]: boolean | object | string | string[] };
|
||||||
transactionCount: number;
|
transactionCount: number;
|
||||||
userCount: number;
|
userCount: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user