Skip to content

Commit

Permalink
Merge pull request #99 from PLADI-ALM/feat/PDW-58-manager-resource-ed…
Browse files Browse the repository at this point in the history
…it-api

[PDW-58/hotfix] 회의실 및 자원 목록 조회 header 값 추가
  • Loading branch information
ryr0121 authored Oct 22, 2023
2 parents bc43662 + 33ed5cf commit 74530b2
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 74530b2

Please sign in to comment.