Skip to content

Commit

Permalink
fix: cors
Browse files Browse the repository at this point in the history
  • Loading branch information
choipureum committed Jun 1, 2024
1 parent 80ef5f8 commit ba91c43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function post<T>(url: string, data: unknown): Promise<T> {
return instance
.post<unknown, AxiosResponse<T>>(url, data)
.then((response) => {
console.log(response.data);
return response.data;
});
}
Expand Down
6 changes: 4 additions & 2 deletions src/hooks/query/useFactCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export type newsListType = {
link: string;
};

export const postGetResult = (youtubeUrl: string): Promise<responseType> => {
return post("/get-result", { url: youtubeUrl });
export const postGetResult = async (
youtubeUrl: string,
): Promise<responseType> => {
return await post("/get-result", { url: youtubeUrl });
};

0 comments on commit ba91c43

Please sign in to comment.