diff --git a/CHANGELOG.md b/CHANGELOG.md index 697f51601..49419da3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Added the application version to the endpoint `GET api/v1/admin` + ## 2.8.0 - 2023-10-03 ### Added - Supported enter key press to submit the form of the create or update account dialog -- Added the version to the admin control panel +- Added the application version to the admin control panel - Added pagination parameters (`skip`, `take`) to the endpoint `GET api/v1/order` ### Changed diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts index a45fbe634..dd9e3f9ce 100644 --- a/apps/api/src/app/admin/admin.service.ts +++ b/apps/api/src/app/admin/admin.service.ts @@ -1,4 +1,5 @@ import { SubscriptionService } from '@ghostfolio/api/app/subscription/subscription.service'; +import { environment } from '@ghostfolio/api/environments/environment'; import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; @@ -97,7 +98,8 @@ export class AdminService { settings: await this.propertyService.get(), transactionCount: await this.prismaService.order.count(), userCount: await this.prismaService.user.count(), - users: await this.getUsersWithAnalytics() + users: await this.getUsersWithAnalytics(), + version: environment.version }; } diff --git a/libs/common/src/lib/interfaces/admin-data.interface.ts b/libs/common/src/lib/interfaces/admin-data.interface.ts index b66676346..68e1cbca4 100644 --- a/libs/common/src/lib/interfaces/admin-data.interface.ts +++ b/libs/common/src/lib/interfaces/admin-data.interface.ts @@ -12,4 +12,5 @@ export interface AdminData { lastActivity: Date; transactionCount: number; }[]; + version: string; }