You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/requests/saveFavouriteTeam.tsx

25 lines
447 B

import { API_ROOT } from 'config'
import { callApi } from 'helpers'
type SaveFavouriteTeamType = {
answer_id: number,
survey_id: number,
}
export const saveFavouriteTeam = async ({
answer_id,
survey_id,
}: SaveFavouriteTeamType): Promise<{status: string}> => {
const config = {
body: {
answer_id,
survey_id,
},
method: 'POST',
}
return callApi({
config,
url: `${API_ROOT}/v1/survey/answer`,
})
}