Commit a0b9d8c0 authored by samy's avatar samy
Browse files

Store summary and keywords on OpenPaaS

parent e5bc8b81
......@@ -20,15 +20,21 @@
'use strict';
/* global robotLib:true XMLHttpRequest */
/* global robotLib:true require XMLHttpRequest */
/* exported robotController */
robotLib.archive = function (config) {
return {
store(transcript) {
const xmlhttp = new XMLHttpRequest();
xmlhttp.open('POST', config.archive + '/json-handler');
xmlhttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
xmlhttp.send(JSON.stringify(transcript));
const OpenPaasStore = config.archive;
const xhttp = new XMLHttpRequest();
if (transcript === undefined) {
console.log('there is no transcription yet!');
return false;
}
xhttp.open('POST', OpenPaasStore + '/summary');
xhttp.setRequestHeader('Content-Type', 'application/json');
xhttp.send(JSON.stringify(transcript));
return true;
}
};
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment