Commit 1df2ddd2 authored by marioromera's avatar marioromera
Browse files

add variable apikey to requests

parent 82a1492d
......@@ -136,7 +136,7 @@ async function getRevisionText(revision) {
async function startEtherpad() {
logger.warn('starting etherpad');
const response = await fetch(
`${etherpadUrl}/api/1/createPad?apikey=0ee96c0c21cab2c92d817414589f3f4ebf13af96bf54318f4ff72065cca93d27&padID=poc&text="Aesthetics promises a non-polemical, consensual framing of the common world."`
`${etherpadUrl}/api/1/createPad?apikey=${etherpadApiKey}&padID=poc&text="Aesthetics promises a non-polemical, consensual framing of the common world."`
);
const etherpadJson = await response.json();
......@@ -151,12 +151,13 @@ async function startEtherpad() {
async function saveRevision() {
logger.warn('Saving revision');
const response = await fetch(
`${etherpadUrl}/api/1.2.11/saveRevision?apikey=0ee96c0c21cab2c92d817414589f3f4ebf13af96bf54318f4ff72065cca93d27&padID=poc`
`${etherpadUrl}/api/1.2.11/saveRevision?apikey=${etherpadApiKey}&padID=poc`
);
const etherpadJson = await response.json();
if (etherpadJson.messsage !== 'ok') {
logger.error('Revision not saved, error', etherpadJson.message);
logger.error('Api key used', etherpadApiKey);
} else {
logger.success('Revision saved');
}
......
Supports Markdown
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