1
0
Fork 0

feat(backend): Updates for curated sets

This commit is contained in:
joostdecock 2023-09-03 17:53:19 +02:00
parent 3c5985956b
commit 52b2faf127
26 changed files with 890 additions and 113 deletions

View file

@ -480,6 +480,27 @@ Backend.prototype.removeImage = async function (id) {
return responseHandler(await api.delete(`/images/${id}/jwt`, this.auth))
}
/*
* Suggest a measurements set for curation
*/
Backend.prototype.suggestCset = async function (data) {
return responseHandler(await api.post(`/curated-sets/suggest/jwt`, data, this.auth))
}
/*
* Suggest an option pack
*/
Backend.prototype.suggestOpack = async function (data) {
return responseHandler(await api.post(`/option-packs/suggest/jwt`, data, this.auth))
}
/*
* Create a curated set from a suggested set
*/
Backend.prototype.csetFromSuggestedSet = async function (id) {
return responseHandler(await api.post(`/curated-sets/from/${id}/jwt`, {}, this.auth))
}
/*
* Ping backend to see if current token is still valid
*/