Skip to content

Commit

Permalink
chore: change 'council' to 'team'
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-hh-aa committed Nov 18, 2024
1 parent 6cf81ea commit 6264cc2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions api.planx.uk/modules/analytics/metabase/shared/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface Input {
councilName: string;
teamName: string;
originalDashboardId: number;
/** The name of the filter to be updated */
filter: string;
Expand All @@ -14,11 +14,10 @@ export function validateInput(input: unknown): input is Input {
}

// check that input object is same shape as Input type with same properties
const { councilName, originalDashboardId, filter, filterValue } =
input as Input;
const { teamName, originalDashboardId, filter, filterValue } = input as Input;

if (typeof councilName !== "string" || councilName.trim() === "") {
console.error("Invalid councilName: must be a non-empty string");
if (typeof teamName !== "string" || teamName.trim() === "") {
console.error("Invalid teamName: must be a non-empty string");
return false;
}

Expand Down

0 comments on commit 6264cc2

Please sign in to comment.