Skip to content

Commit

Permalink
chore: tidy comments and console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-hh-aa committed Dec 10, 2024
1 parent c384fee commit fafd734
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ interface GetMetabaseId {
}

export const getTeamAndMetabaseId = async (name: string) => {
const lowerName = name.toLowerCase();
console.log("RUNNING getTeamAndMetabaseId...");
try {
const response = await $api.client.request<GetMetabaseId>(
gql`
query GetTeamAndMetabaseId($name: String!) {
teams(where: { name: { _eq: $name } }) {
teams(where: { name: { _ilike: $name } }) {
id
name
metabaseId: metabase_id
}
}
`,
{
name: lowerName,
name: name,
},
);
console.log("Raw response:");
Expand Down
2 changes: 0 additions & 2 deletions api.planx.uk/modules/analytics/metabase/collection/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export async function checkCollections(
const { metabaseId, id } = teamAndMetabaseId;

if (metabaseId) {
console.log("Updating MetabaseId...");
await updateMetabaseId(id, metabaseId);
return metabaseId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface UpdateMetabaseId {
};
}

/** Updates column `metabase_id` in the Planx DB `teams` table */
export const updateMetabaseId = async (teamId: number, metabaseId: number) => {
try {
const response = await $api.client.request<UpdateMetabaseId>(
Expand All @@ -31,7 +32,6 @@ export const updateMetabaseId = async (teamId: number, metabaseId: number) => {
metabaseId: metabaseId,
},
);
console.log({ response });
return response;
} catch (e) {
console.error(
Expand Down

0 comments on commit fafd734

Please sign in to comment.