From 67b0182bb51f3566ac0872f076acf72c09e125ba Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Mon, 30 Dec 2019 00:05:17 -0700 Subject: [PATCH] refactor: broke up large line to make it more readable. --- src/App.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 79e51a9..8e506a2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -543,9 +543,14 @@ export default { // file into JSON-LD. const outerThis = this; Vue.nextTick(function () { + // Convert phylorefs and phylogeny to JSON-LD. + const jsonld = outerThis.getPhylorefsAndPhylogenyAsOntology(); + const jsonldGzipped = zlib.gzipSync(jsonld); + // Prepare request for submission. const query = jQuery.param({ - jsonldGzipped: Buffer.from(zlib.gzipSync(outerThis.getPhylorefsAndPhylogenyAsOntology())).toString('base64') + // Convert Gzipped data into a string in Base64. + jsonldGzipped: Buffer.from(jsonldGzipped).toString('base64') }).replace(/%20/g, '+'); // $.post will do this automatically, // but we need to do this here so our // signature works.