Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
eh-am committed Apr 13, 2023
1 parent 3838b85 commit 04f3dae
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions public/app/overrides/services/tags.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Result } from '@webapp/util/fp';
import {
Tags,
TagsValuesSchema,
Expand All @@ -11,7 +10,7 @@ export async function fetchTags(query: string, from: number, until: number) {
const response = await request('/pyroscope/labels');
const isMetaTag = (tag: string) => tag.startsWith('__') && tag.endsWith('__');

return parseResponse(
return parseResponse<Tags>(
response,
TagsSchema.transform((tags) => {
return tags.filter((t) => !isMetaTag(t));
Expand All @@ -30,5 +29,5 @@ export async function fetchLabelValues(
});
const response = await request('/pyroscope/label-values?' + searchParams);

return parseResponse(response, TagsValuesSchema);
return parseResponse<TagsValues>(response, TagsValuesSchema);
}

0 comments on commit 04f3dae

Please sign in to comment.