Browse Source
Task/improve parsing of integer query parameter includeHistoricalData in various endpoints (#7208)
* Improve parsing of integer query parameter includeHistoricalData
* Update changelog
pull/7211/head
Thomas Kaul
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
8 additions and
2 deletions
-
CHANGELOG.md
-
apps/api/src/app/endpoints/market-data/market-data.controller.ts
-
apps/api/src/app/symbol/symbol.controller.ts
|
|
|
@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Hardened the endpoint of the public access for portfolio sharing by restricting it to public accesses |
|
|
|
- Improved the parsing of integer query parameters (`skip` and `take`) in the `GET api/v1/admin/user` endpoint |
|
|
|
- Improved the parsing of integer query parameters (`skip` and `take`) in the `GET api/v1/asset-profiles` endpoint |
|
|
|
- Improved the parsing of the integer query parameter (`includeHistoricalData`) in the `GET api/v1/market-data/markets` endpoint |
|
|
|
- Improved the parsing of the integer query parameter (`includeHistoricalData`) in the `GET api/v1/symbol/:dataSource/:symbol` endpoint |
|
|
|
- Improved the language localization by translating various tooltips across the application |
|
|
|
- Improved the language localization for Ukrainian (`uk`) |
|
|
|
- Upgraded `yahoo-finance2` from version `3.14.3` to `3.15.4` |
|
|
|
|
|
|
|
@ -22,6 +22,7 @@ import { |
|
|
|
HttpException, |
|
|
|
Inject, |
|
|
|
Param, |
|
|
|
ParseIntPipe, |
|
|
|
Post, |
|
|
|
Query, |
|
|
|
UseGuards |
|
|
|
@ -45,7 +46,8 @@ export class MarketDataController { |
|
|
|
@HasPermission(permissions.readMarketDataOfMarkets) |
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard) |
|
|
|
public async getMarketDataOfMarkets( |
|
|
|
@Query('includeHistoricalData') includeHistoricalData = 0 |
|
|
|
@Query('includeHistoricalData', new ParseIntPipe({ optional: true })) |
|
|
|
includeHistoricalData = 0 |
|
|
|
): Promise<MarketDataOfMarketsResponse> { |
|
|
|
const [ |
|
|
|
marketDataFearAndGreedIndexCryptocurrencies, |
|
|
|
|
|
|
|
@ -14,6 +14,7 @@ import { |
|
|
|
HttpException, |
|
|
|
Inject, |
|
|
|
Param, |
|
|
|
ParseIntPipe, |
|
|
|
Query, |
|
|
|
UseGuards, |
|
|
|
UseInterceptors |
|
|
|
@ -69,7 +70,8 @@ export class SymbolController { |
|
|
|
public async getSymbolData( |
|
|
|
@Param('dataSource') dataSource: DataSource, |
|
|
|
@Param('symbol') symbol: string, |
|
|
|
@Query('includeHistoricalData') includeHistoricalData = 0 |
|
|
|
@Query('includeHistoricalData', new ParseIntPipe({ optional: true })) |
|
|
|
includeHistoricalData = 0 |
|
|
|
): Promise<SymbolItem> { |
|
|
|
if (!DataSource[dataSource]) { |
|
|
|
throw new HttpException( |
|
|
|
|