Skip to content

Commit

Permalink
Refactor: Improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakshuGautam committed Mar 25, 2023
1 parent 7c32493 commit cb1ee2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions impl/c-qube/src/services/dataset/dataset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,14 @@ export class DatasetService {
durs: DatasetUpdateRequest[],
): Promise<void> {
const data = [];
const timeDimensionProperties = durs[0].dataset.timeDimension
? this.addDateDimension(durs[0].dataset.timeDimension.key)
: [];
durs[0].dataset.schema.properties = {
...durs[0].dataset.schema.properties,
...this.counterAggregates(),
...this.addNonTimeDimension(durs[0].dataset.dimensions[0]),
...(durs[0].dataset.timeDimension
? this.addDateDimension(durs[0].dataset.timeDimension.key)
: []),
...timeDimensionProperties,
};
for (const dur of durs) {
data.push({ ...dur.updateParams, ...dur.filterParams });
Expand Down

0 comments on commit cb1ee2c

Please sign in to comment.