Skip to content

Commit 3ce04af

Browse files
committed
Update fetch.ts
1 parent 0419300 commit 3ce04af

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib/api/fetch.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,10 @@ export const fetchApiServerJson = async <T>(
7575
jq?: string,
7676
httpMethod: string = 'GET',
7777
body?: BodyInit,
78-
): Promise<T | string> => {
78+
): Promise<T> => {
7979
const res = await fetchApiServer(path, config, jq, httpMethod, body);
8080
const data = await parseJsonOrText(res);
81-
if (typeof data === 'string') {
82-
return data as string;
83-
}
81+
8482
return data as T;
8583
};
8684

0 commit comments

Comments
 (0)