공통코드 조회기능 추가
This commit is contained in:
@@ -42,7 +42,7 @@ export const putData = async (url: string, data: object): Promise<any> => {
|
||||
};
|
||||
|
||||
export const getData = async (url: string): Promise<any> => {
|
||||
const res = await fetch(`${BASE_URL}/${url}`, {
|
||||
const res = await fetch(url.startsWith('/') ? `${url}` : `${BASE_URL}/${url}`, {
|
||||
method: "GET",
|
||||
});
|
||||
if (res.ok) {
|
||||
|
||||
Reference in New Issue
Block a user