From 5e3cac8ac988459ad21ff074091d4fd864fa1ae2 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 12 Sep 2022 13:34:06 +0200 Subject: [PATCH] Feature/sort benchmarks by name (#1250) * Sort benchmarks by name * Update changelog --- CHANGELOG.md | 6 ++++++ .../api/src/app/benchmark/benchmark.service.ts | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b883d54..c4016ea2e 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 + +### Changed + +- Sorted the benchmarks by name + ## 1.192.0 - 11.09.2022 ### Changed diff --git a/apps/api/src/app/benchmark/benchmark.service.ts b/apps/api/src/app/benchmark/benchmark.service.ts index 7d894428b..a897a6814 100644 --- a/apps/api/src/app/benchmark/benchmark.service.ts +++ b/apps/api/src/app/benchmark/benchmark.service.ts @@ -119,14 +119,16 @@ export class BenchmarkService { const assetProfiles = await this.symbolProfileService.getSymbolProfilesByIds(symbolProfileIds); - return assetProfiles.map(({ dataSource, id, name, symbol }) => { - return { - dataSource, - id, - name, - symbol - }; - }); + return assetProfiles + .map(({ dataSource, id, name, symbol }) => { + return { + dataSource, + id, + name, + symbol + }; + }) + .sort((a, b) => a.name.localeCompare(b.name)); } public async getMarketDataBySymbol({