From 9db675b9553a25f1dee400b691432d5d0490bbd1 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 3 Jun 2023 19:32:48 +0200 Subject: [PATCH] Feature/improve get symbol data endpoint (#2041) * Add default value to query parameter * Update changelog --- CHANGELOG.md | 6 ++++++ apps/api/src/app/symbol/symbol.controller.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8856ee272..651b19b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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 a default value for the `includeHistoricalData` attribute in the symbol data endpoint + ## 1.276.0 - 2023-06-03 ### Added diff --git a/apps/api/src/app/symbol/symbol.controller.ts b/apps/api/src/app/symbol/symbol.controller.ts index 6003c50d3..810093611 100644 --- a/apps/api/src/app/symbol/symbol.controller.ts +++ b/apps/api/src/app/symbol/symbol.controller.ts @@ -60,7 +60,7 @@ export class SymbolController { public async getSymbolData( @Param('dataSource') dataSource: DataSource, @Param('symbol') symbol: string, - @Query('includeHistoricalData') includeHistoricalData?: number + @Query('includeHistoricalData') includeHistoricalData = 0 ): Promise { if (!DataSource[dataSource]) { throw new HttpException(