Skip to content

Commit

Permalink
✨ Added the call to check if the postal code is enabled to generationkwh
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenuken09 committed Aug 9, 2023
1 parent 18ad3f3 commit 4e77ea7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,21 @@ export const generationChangeContractPriority = async (data, token) => {
})
}

export const checkIsFromGenerationEnabledZone = async (data, token) => {
export const checkIsFromGenerationEnabledZone = async (data) => {
const {memberNumber,memberVat} = data
return axios({
method: 'GET',
url: `${API_BASE_URL}/data/generationkwh/can_join/${memberNumber}/${memberVat}`,
headers: { Authorization: token }
url: `${API_BASE_URL}/data/generationkwh/can_join/${memberNumber}/${memberVat}`
}).then((response) => {
return response?.data
})
}

export const checkIsPostalCodeFromGenerationEnabledZone = async (data) => {
const {postalCode} = data
return axios({
method: 'GET',
url: `${API_BASE_URL}/data/generationkwh/can_join/${postalCode}`
}).then((response) => {
return response?.data
})
Expand Down

0 comments on commit 4e77ea7

Please sign in to comment.