Skip to content

Commit

Permalink
feat: #12 URL 주소 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mineii committed Jan 17, 2023
1 parent dd79b4c commit c540589
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/StoreRegister/StoreRegisterInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function RegisterInput() {

const storeRegister =()=>{
//axios.post(url : post가 연결되어야 할 api주소, data : 백엔드에서 정의한 request body).then(앞 코드가 정상작동하면 실행되는 다음 행위)
axios.post('http://localhost:8000/api/v1/store/signin/',{
axios.post('http://localhost:8000/api/v1/stores/signin/',{
store_name: store_name,
phone_num: phone_num,
latitude: 0,
Expand Down
4 changes: 2 additions & 2 deletions src/components/WaitingList/StoreInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function StoreInformation() {

// 400 error - url확인
const storeinformationText = () => {
axios.patch('http://localhost:8000/api/v1/store/detail/',{
store_id: 1, //localStorage.getItem("store_id"),
axios.patch('http://localhost:8000/api/v1/stores/details/',{
store_id: 2, //localStorage.getItem("store_id"),
information: text
})
.then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/WaitingList/SubButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function SubButton() {

const [is_waiting, setIs_waiting] = useState(true); // 로그인 하고 받은 스토어 아이디 가지고 조회해서 이즈웨이팅 값 넣기
const iswaitingChange = () => {
axios.patch('http://localhost:8000/api/v1/store/breaktime/',{
axios.patch('http://localhost:8000/api/v1/stores/breaktimes/',{
store_id: 2 //localStorage.getItem("store_id") //회원가입(가게등록)을 해서 store_id가 생성이 돼야 localStorage에 저장이 되고,
//이후 getItem을 통해 store_id를 가져올 수 있는데, 아직 그 과정이 선행되지 않아 임의로 2로 지정해주어 확인 작업함
})
Expand Down

0 comments on commit c540589

Please sign in to comment.