Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Oct 30, 2023
1 parent deca344 commit 3f585ac
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions client/src/components/Grid/configs/visualizations.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { fetcher } from "@/api/schema";

Check failure on line 1 in client/src/components/Grid/configs/visualizations.ts

View workflow job for this annotation

GitHub Actions / client-unit-test (18)

Run autofix to sort these imports!
import Filtering, { contains, equals, expandNameTagWithQuotes, toBool } from "@/utils/filtering";
import Filtering, { contains, equals, toBool } from "@/utils/filtering";

Check failure on line 2 in client/src/components/Grid/configs/visualizations.ts

View workflow job for this annotation

GitHub Actions / client-unit-test (18)

'@/utils/filtering' imported multiple times
import expandNameTagWithQuotes from "@/utils/filtering";

Check failure on line 3 in client/src/components/Grid/configs/visualizations.ts

View workflow job for this annotation

GitHub Actions / client-unit-test (18)

'@/utils/filtering' imported multiple times
import { withPrefix } from "@/utils/redirect";
import { errorMessageAsString, rethrowSimple } from "@/utils/simple-error";
import type { Router } from "vue-router";
import type Router from "vue-router";

/**
* Api endpoint fetchers
Expand All @@ -16,7 +17,7 @@ const updateTags = fetcher.path("/api/tags").method("put").create();
/**
* Local types
*/
type SortKeyLiteral = "create_time" | "title" | "update_time" |;
type SortKeyLiteral = "create_time" | "title" | "update_time" | undefined;

/**
* Request and return data from server
Expand Down Expand Up @@ -75,7 +76,7 @@ const fields = [
icon: "copy",
handler: async (data: Record<string, unknown>) => {
try {
const copyResponse = await getVisualization({ visualization_id: data.id });
const copyResponse = await fetchAllBroadcasts({ visualization_id: data.id });
const copyViz = copyResponse.data;
const newViz = {
title: `Copy of '${copyViz.title}'`,
Expand Down Expand Up @@ -131,14 +132,13 @@ const fields = [
key: "tags",
title: "Tags",
type: "tags",
handler: async (data: Record<string, unknown>) => {
const tagPayload = {
item_id: data.id,
item_class: "Visualization",
item_tags: data.tags,
};
handler: async (data: Record<string, unknown >) => {
try {
await updateTags(tagPayload);
await updateTags({
item_id: data.id as string,
item_class: "Visualization",
item_tags: data.tags as Array<string>,
});
} catch (e) {
rethrowSimple(e);
}
Expand Down

0 comments on commit 3f585ac

Please sign in to comment.