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 ba91c43 commit fd8effb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ export function get<T>(...args: Parameters<typeof instance.get>) {
return instance.get<T, T>(...args);
}

export function post<T>(url: string, data: unknown): Promise<T> {
return instance
.post<unknown, AxiosResponse<T>>(url, data)
.then((response) => {
return response.data;
});
export async function post<T>(url: string, data: unknown): Promise<T> {
const response = await instance.post<T, T>(url, data);
return response;
}

export function put<T>(...args: Parameters<typeof instance.put>) {
Expand Down

0 comments on commit fd8effb

Please sign in to comment.