Skip to content

Commit b10ce03

Browse files
committed
Change header to match latest changes
1 parent 869abbb commit b10ce03

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/services/challenges.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export async function fetchChallengePhases () {
100100
export async function fetchChallenge (challengeId) {
101101
const response = await axiosInstance.get(`${CHALLENGE_API_URL}/${challengeId}`, {
102102
headers: {
103-
'challenge-api-version': CHALLENGE_API_VERSION
103+
'app-version': CHALLENGE_API_VERSION
104104
}
105105
})
106106
return normalizeChallengeDataFromAPI(_.get(response, 'data'))
@@ -114,7 +114,7 @@ export async function fetchChallenge (challengeId) {
114114
export function createChallenge (challenge) {
115115
return axiosInstance.post(CHALLENGE_API_URL, updateChallengePhaseBeforeSendRequest(challenge), {
116116
headers: {
117-
'challenge-api-version': CHALLENGE_API_VERSION
117+
'app-version': CHALLENGE_API_VERSION
118118
}
119119
}).then(response => {
120120
return normalizeChallengeDataFromAPI(_.get(response, 'data'))
@@ -130,7 +130,7 @@ export function createChallenge (challenge) {
130130
export function updateChallenge (challengeId, challenge) {
131131
return axiosInstance.put(`${CHALLENGE_API_URL}/${challengeId}`, updateChallengePhaseBeforeSendRequest(challenge), {
132132
headers: {
133-
'challenge-api-version': CHALLENGE_API_VERSION
133+
'app-version': CHALLENGE_API_VERSION
134134
}
135135
}).then(response => {
136136
return normalizeChallengeDataFromAPI(_.get(response, 'data'))
@@ -148,7 +148,7 @@ export function updateChallenge (challengeId, challenge) {
148148
export function createAttachments (challengeId, attachments) {
149149
return axiosInstance.post(`${CHALLENGE_API_URL}/${challengeId}/attachments`, attachments, {
150150
headers: {
151-
'challenge-api-version': CHALLENGE_API_VERSION
151+
'app-version': CHALLENGE_API_VERSION
152152
}
153153
})
154154
}
@@ -164,7 +164,7 @@ export function createAttachments (challengeId, attachments) {
164164
export function removeAttachment (challengeId, attachmentId) {
165165
return axiosInstance.delete(`${CHALLENGE_API_URL}/${challengeId}/attachments/${attachmentId}`, {
166166
headers: {
167-
'challenge-api-version': CHALLENGE_API_VERSION
167+
'app-version': CHALLENGE_API_VERSION
168168
}
169169
})
170170
}
@@ -181,7 +181,7 @@ export function fetchChallenges (filters, params) {
181181
}
182182
return axiosInstance.get(`${CHALLENGE_API_URL}?${qs.stringify(query, { encode: false })}`, {
183183
headers: {
184-
'challenge-api-version': CHALLENGE_API_VERSION
184+
'app-version': CHALLENGE_API_VERSION
185185
}
186186
}).then(response => {
187187
// normalize challenge data in the list of challenges for consistency with data of a single challenge details page
@@ -198,7 +198,7 @@ export function fetchChallenges (filters, params) {
198198
export function patchChallenge (challengeId, params) {
199199
return axiosInstance.patch(`${CHALLENGE_API_URL}/${challengeId}`, updateChallengePhaseBeforeSendRequest(params), {
200200
headers: {
201-
'challenge-api-version': CHALLENGE_API_VERSION
201+
'app-version': CHALLENGE_API_VERSION
202202
}
203203
}).then(rs => {
204204
return normalizeChallengeDataFromAPI(_.get(rs, 'data'))
@@ -212,7 +212,7 @@ export function patchChallenge (challengeId, params) {
212212
export function deleteChallenge (challengeId) {
213213
return axiosInstance.delete(`${CHALLENGE_API_URL}/${challengeId}`, {
214214
headers: {
215-
'challenge-api-version': CHALLENGE_API_VERSION
215+
'app-version': CHALLENGE_API_VERSION
216216
}
217217
})
218218
}

0 commit comments

Comments
 (0)