Skip to content

Commit

Permalink
fix: 필터 조회 API 요청 주소 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnwns committed Dec 1, 2024
1 parent 5febd65 commit e616ce5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions FE/error/src/components/EconoCalendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ const EconoCalendar = ({
setIsLoggedIn(false);
setToken(null);
window.location.reload();
// } else {
// const newToken = "dummyToken" + Math.random().toString(36).substr(2, 9); // 임의의 토큰 생성
// localStorage.setItem("slackToken", newToken);
// setToken(newToken);
// setIsLoggedIn(true);
// }
//TODO: 추후 아래 코드로 변경
//}
} else {
window.location.href = "/login";
const newToken = "dummyToken" + Math.random().toString(36).substr(2, 9); // 임의의 토큰 생성
localStorage.setItem("slackToken", newToken);
setToken(newToken);
setIsLoggedIn(true);
}
// TODO: 추후 아래 코드로 변경
// }
// } else {
// window.location.href = "/login";
// }
};

return (
Expand Down
2 changes: 1 addition & 1 deletion FE/error/src/components/scheduleCreate/CreateModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CreateModal = ({

const fetchFilters = async () => {
try {
const response = await axios.get("/api/filter", {
const response = await axios.get("/api/filter/1", {
headers: { Authorization: `Bearer ${storedToken}` },
});
if (response.data && response.data.data) {
Expand Down
2 changes: 1 addition & 1 deletion FE/error/src/pages/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const MainPage = () => {
useEffect(() => {
const storedToken = localStorage.getItem("slackToken");
axios
.get("/api/filter", {
.get("/api/filter/1", {
headers: { Authorization: `Bearer ${storedToken}` },
})
.then((res) => {
Expand Down

0 comments on commit e616ce5

Please sign in to comment.