Skip to content

Commit

Permalink
refactor: broke up large line to make it more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav committed Dec 30, 2019
1 parent 3dd1867 commit 67b0182
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 67b0182

Please sign in to comment.