Skip to content

Commit

Permalink
[PDW-58] fix: 회의실 및 자원 목록 조회 header 값 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chayoosang committed Oct 22, 2023
1 parent bc43662 commit 33ed5cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/pages/booking/selectOffice/SelectOffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SearchButtonImg from "../../../assets/images/button/searchButton.png";
import ImageButton from "../../../components/button/ImageButton";
import {SelectToggle} from "../../../components/capsule/SelectToggle";
import {TimeList} from "../../../constants/ToggleList";
import {getToken} from "../../../utils/IsLoginUtil";

function SelectOffice(props) {

Expand All @@ -22,7 +23,11 @@ function SelectOffice(props) {
const [endTime, setEndTime] = useState("");

const getOfficeList = () => {
OfficesAxios.get("")
OfficesAxios.get("?size=200", {
headers: {
Authorization: getToken()
}
})
.then((Response) => { setOffices(Response.data.data.content) })
.catch((error) => {basicError(error)})
};
Expand Down
7 changes: 6 additions & 1 deletion src/pages/booking/selectResource/SelectResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ResourceInfo from "components/resourceInfo/ResourceInfo";
import { ResourcesAxios } from "api/AxiosApi";
import { useNavigate } from "react-router-dom";
import { basicError } from 'utils/ErrorHandlerUtil';
import {getToken} from "../../../utils/IsLoginUtil";


export const SearchTitleContainer = styled.div`
Expand Down Expand Up @@ -71,7 +72,11 @@ function SelectResource(props) {
const [endDate, setEndDate] = useState("");

const getResourceList = () => {
ResourcesAxios.get()
ResourcesAxios.get("?size=200", {
headers: {
Authorization: getToken()
}
})
.then((Response) => { setResourceList(Response.data.data.content) })
.catch((error) => {basicError(error)})
};
Expand Down

0 comments on commit 33ed5cf

Please sign in to comment.