Merge branch 'main' of github.com:ghostfolio/ghostfolio
All checks were successful
Docker image CD / build_and_push (push) Successful in 22m41s

This commit is contained in:
sudacode 2025-05-08 12:00:44 -07:00
commit 92fbf33032
3 changed files with 25 additions and 6 deletions

View File

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Added
- Added the asset profile count per data provider to the endpoint `GET api/v1/admin`
### Changed
- Improved the language localization for Catalan (`ca`)

View File

@ -143,15 +143,30 @@ export class AdminService {
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 {
dataProviders,
settings,
transactionCount,
userCount,
dataProviders: dataSources.map((dataSource) => {
return this.dataProviderService
.getDataProvider(dataSource)
.getDataProviderInfo();
}),
version: environment.version
};
}

View File

@ -1,7 +1,7 @@
import { DataProviderInfo } from './data-provider-info.interface';
export interface AdminData {
dataProviders: DataProviderInfo[];
dataProviders: (DataProviderInfo & { assetProfileCount: number })[];
settings: { [key: string]: boolean | object | string | string[] };
transactionCount: number;
userCount: number;