Skip to content

Commit f8a942d

Browse files
authored
Merge pull request #6 from axsemantics/lexicon
Adjust to new endpoint
2 parents 3ede07b + 6ef7f33 commit f8a942d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lexicon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ const lexicon = function (fetch, baseUrl, token) {
2121
return api.fetch(`lexica/${id}/`, 'DELETE')
2222
},
2323
addTraining (id, trainingId) {
24-
return api.fetch(`lexica/${id}/add-trainings/`, 'POST', {trainings: [trainingId]})
24+
return api.fetch(`lexica/${id}/add-training/`, 'POST', {training: trainingId})
2525
},
2626
removeTraining (id, trainingId) {
27-
return api.fetch(`lexica/${id}/remove-trainings/`, 'POST', {trainings: [trainingId]})
27+
return api.fetch(`lexica/${id}/remove-training/`, 'POST', {training: trainingId})
2828
},
2929
getLexiconEntry (id) {
3030
return api.fetch(`lexica/${id}/`)

0 commit comments

Comments
 (0)