Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 54d7c41

Browse files
more fixes
1 parent 7661072 commit 54d7c41

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/services/challengeService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ async function updateChallenge (challenge, previousState) {
174174
updateDetails[op] = {}
175175
}
176176
if (key === 'attachments') {
177-
updateDetails[op].attachments = newAttachments
177+
updateDetails[op].attachments = updateChallenge.attachments
178178
} else if (key === 'terms') {
179-
updateDetails[op].terms = newTermsOfUse
179+
updateDetails[op].terms = updateChallenge.terms
180180
} else {
181181
updateDetails[op][key] = value
182182
}
@@ -185,10 +185,10 @@ async function updateChallenge (challenge, previousState) {
185185
let newValue
186186
if (key === 'attachments') {
187187
oldValue = previousState.attachments ? JSON.stringify(previousState.attachments) : 'NULL'
188-
newValue = JSON.stringify(newAttachments)
188+
newValue = JSON.stringify(updateChallenge.attachments)
189189
} else if (key === 'terms') {
190190
oldValue = previousState.terms ? JSON.stringify(previousState.terms) : 'NULL'
191-
newValue = JSON.stringify(newTermsOfUse)
191+
newValue = JSON.stringify(updateChallenge.terms)
192192
} else {
193193
oldValue = previousState[key] ? JSON.stringify(previousState[key]) : 'NULL'
194194
newValue = JSON.stringify(value)

0 commit comments

Comments
 (0)