Skip to content

Commit

Permalink
Feat. wishtoggle api #45
Browse files Browse the repository at this point in the history
  • Loading branch information
skawnkk committed Jun 3, 2021
1 parent 066f1ca commit 31ca33f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions frontend/src/customHook/axiosAPI.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { FilterDateToForm } from './useDateInfo'
import { defaultValue } from './atoms'

import {IParams} from '../Interface'
export async function getFeeData(
city: string | undefined,
checkIn: string | number | undefined,
Expand Down Expand Up @@ -54,9 +54,8 @@ export async function getHouseData(value: any) {
adult,
child,
baby,
}: DetailProps = value
}: IParams = value

console.log(value)
let guestAdult = Number(adult)
let guestChild = Number(child)
let guestBaby = Number(baby)
Expand Down Expand Up @@ -94,3 +93,10 @@ export async function getHouseData(value: any) {
const response = await axios.get(url)
return response
}

export async function wishToggle(id:number){
let url = `http://13.125.140.183/rooms/${id}/wish`
const response = await axios.patch(url)
console.log(response)
return response
}

0 comments on commit 31ca33f

Please sign in to comment.