Browse Source
Add application version to admin endpoint (#2423)
* Add application version to admin endpoint
* Update changelog
pull/2416/head^2
Siddharth Singh
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
11 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/admin/admin.service.ts
-
libs/common/src/lib/interfaces/admin-data.interface.ts
|
|
@ -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 |
|
|
|
|
|
@ -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 |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -12,4 +12,5 @@ export interface AdminData { |
|
|
|
lastActivity: Date; |
|
|
|
transactionCount: number; |
|
|
|
}[]; |
|
|
|
version: string; |
|
|
|
} |
|
|
|