Files
shoptime/com.twin.app.shoptime/src/api/onSaleApi.js
2024-01-18 11:01:57 +09:00

28 lines
599 B
JavaScript

import { URLS } from "./apiConfig";
import api from "./axiosConfig";
// Onsale 조회 IF-LGSP-086
export async function getOnSaleInfo(props) {
const { lgCatCd, categoryIncFlag } = props;
try {
const response = await api.get(URLS.GET_ON_SALE_INFO, {
params: {
categoryIncFlag,
lgCatCd,
},
});
return response.data.data;
} catch (error) {
const { response } = error;
if (response) {
const statusCode = response.status;
const statusText = response.statusText;
console.error(`Error: ${statusCode} ${statusText}`);
}
}
}