Skip to content

Commit

Permalink
fix basicQuery payload
Browse files Browse the repository at this point in the history
  • Loading branch information
rrozek committed Mar 20, 2024
1 parent a31cdd5 commit 2d4c8df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ export interface IDashboardElementVis extends IDashboardElement {
| 'pieChart';
}

export interface IDashboardElementBasicQueryMeasure {
columnName: string;
operator: string;
}

export interface IDashboardElementBasicQuery extends IDashboardElementVis {
type: 'basicQuery';
dimension: string;
differential?: string;
measures: string[];
measures: IDashboardElementBasicQueryMeasure[];
}

export interface IDashboardElementCustomQuery extends IDashboardElementVis {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ const dashboardElementBasicQuerySchema =
new mongoose.Schema<IDashboardElementBasicQuery>({
dimension: { type: String },
differential: { type: String },
measures: [{ type: String }],
measures: [
{
columnName: { type: String },
operator: { type: String },
},
],
visType: { type: String, required: true },
});

Expand Down

0 comments on commit 2d4c8df

Please sign in to comment.