mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 17:25:44 +00:00
52 lines
1.9 KiB
JavaScript
52 lines
1.9 KiB
JavaScript
/*****************************************************************************
|
|
* Contributions *
|
|
* Fetch requests for /contributions routes *
|
|
*****************************************************************************/
|
|
Requests.contributions = {};
|
|
|
|
Requests.contributions.spacy_nlp_pipeline_models = {};
|
|
|
|
Requests.contributions.spacy_nlp_pipeline_models.ent = {};
|
|
|
|
Requests.contributions.spacy_nlp_pipeline_models.ent.delete = (spacyNlpPipelineModelId) => {
|
|
let input = `/contributions/spacy-nlp-pipeline-models/${spacyNlpPipelineModelId}`;
|
|
let init = {
|
|
method: 'DELETE'
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
};
|
|
|
|
Requests.contributions.spacy_nlp_pipeline_models.ent.isPublic = {};
|
|
|
|
Requests.contributions.spacy_nlp_pipeline_models.ent.isPublic.update = (spacyNlpPipelineModelId, value) => {
|
|
let input = `/contributions/spacy-nlp-pipeline-models/${spacyNlpPipelineModelId}/is_public`;
|
|
let init = {
|
|
method: 'PUT',
|
|
body: JSON.stringify(value)
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
};
|
|
|
|
Requests.contributions.tesseract_ocr_pipeline_models = {};
|
|
|
|
Requests.contributions.tesseract_ocr_pipeline_models.ent = {};
|
|
|
|
Requests.contributions.tesseract_ocr_pipeline_models.ent.delete = (tesseractOcrPipelineModelId) => {
|
|
let input = `/contributions/tesseract-ocr-pipeline-models/${tesseractOcrPipelineModelId}`;
|
|
let init = {
|
|
method: 'DELETE'
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
};
|
|
|
|
Requests.contributions.tesseract_ocr_pipeline_models.ent.isPublic = {};
|
|
|
|
Requests.contributions.tesseract_ocr_pipeline_models.ent.isPublic.update = (tesseractOcrPipelineModelId, value) => {
|
|
let input = `/contributions/tesseract-ocr-pipeline-models/${tesseractOcrPipelineModelId}/is_public`;
|
|
let init = {
|
|
method: 'PUT',
|
|
body: JSON.stringify(value)
|
|
};
|
|
return Requests.JSONfetch(input, init);
|
|
};
|