From 574a0d3d49693789a9f4249931e5867248a49343 Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Tue, 26 Nov 2024 14:19:46 -0800 Subject: [PATCH 1/8] veg/datamonkey-js#752 -- adding new fel options --- app/models/fel.js | 16 +++++++++++++--- app/routes/fel.js | 10 +++++++--- app/templates/fel/msa_form.ejs | 16 ++++++++++++++++ public/assets/js/fel/msa_form.js | 8 +++++--- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/app/models/fel.js b/app/models/fel.js index c4933642..9ec1e38a 100644 --- a/app/models/fel.js +++ b/app/models/fel.js @@ -15,6 +15,16 @@ var FEL = mongoose.Schema({ resample: Number, ci: Boolean, bootstrap: Boolean, + multiple_hits: { + type: String, + enum: ["None", "Double", "Double+Triple"], + default: "None", + }, + site_multihit: { + type: String, + enum: ["Estimate", "Global"], + default: "Estimate", + }, }); FEL.add(AnalysisSchema); @@ -47,7 +57,7 @@ FEL.virtual("original_fn").get(function () { "/../../uploads/msa/" + this._id + "-original." + - this.original_extension + this.original_extension, ); }); @@ -123,7 +133,7 @@ FEL.statics.spawn = function (fn, options, callback) { } else { var move = Msa.removeTreeFromFile( fel_result.filepath, - fel_result.filepath + fel_result.filepath, ); move.then( (val) => { @@ -137,7 +147,7 @@ FEL.statics.spawn = function (fn, options, callback) { }, (reason) => { callback(err, "issue removing tree from file"); - } + }, ); } } diff --git a/app/routes/fel.js b/app/routes/fel.js index cdd89c3f..711919f7 100644 --- a/app/routes/fel.js +++ b/app/routes/fel.js @@ -36,6 +36,8 @@ exports.uploadFile = function (req, res) { fel.original_extension = path.basename(fn).split(".")[1]; fel.mail = postdata.mail; fel.ci = postdata.confidence_interval == "true"; + fel.multiple_hits = postdata.multiple_hits; + fel.site_multihit = postdata.site_multihit; // Check advanced options if (!_.isNaN(resample)) { @@ -87,7 +89,7 @@ exports.uploadFile = function (req, res) { } else { var move = Msa.removeTreeFromFile( fel_result.filepath, - fel_result.filepath + fel_result.filepath, ); move.then( (val) => { @@ -98,7 +100,7 @@ exports.uploadFile = function (req, res) { }, (reason) => { res.json(500, { error: "issue removing tree from file" }); - } + }, ); } } @@ -116,7 +118,7 @@ exports.uploadFile = function (req, res) { helpers.moveSafely( req.files.files.file, fel_result.filepath, - move_cb + move_cb, ); }); }); @@ -148,6 +150,8 @@ exports.invoke = function (req, res) { // User Parameters fel.tagged_nwk_tree = postdata.nwk_tree; fel.analysis_type = postdata.analysis_type; + fel.multiple_hits = postdata.multiple_hits; // new + fel.site_multihit = postdata.site_multihit; // new fel.status = fel.status_stack[0]; fel.save(function (err, result) { diff --git a/app/templates/fel/msa_form.ejs b/app/templates/fel/msa_form.ejs index 550d3e37..8d5eacac 100644 --- a/app/templates/fel/msa_form.ejs +++ b/app/templates/fel/msa_form.ejs @@ -88,6 +88,22 @@ +
+ + +
+ +
+ + +
has-error<% } %>"> diff --git a/public/assets/js/fel/msa_form.js b/public/assets/js/fel/msa_form.js index c19ec83c..593bc1ac 100644 --- a/public/assets/js/fel/msa_form.js +++ b/public/assets/js/fel/msa_form.js @@ -13,17 +13,19 @@ $(function () { formData.append("gencodeid", $("select[name='gencodeid']").val()); formData.append("ds_variation", $("#ds-variation").val()); formData.append("resample", $("#resample").val()); + formData.append("multiple_hits", $("select[name='multiple_hits']").val()); + formData.append("site_multihit", $("select[name='site_multihit']").val()); formData.append( "receive_mail", - $("input[name='receive_mail']").prop("checked") + $("input[name='receive_mail']").prop("checked"), ); formData.append("mail", $("input[name='mail']").val()); formData.append( "confidence_interval", - $("input[name='confidence-interval']").prop("checked") + $("input[name='confidence-interval']").prop("checked"), ); var action_url = $("#msa-form").attr("action"); @@ -64,7 +66,7 @@ $(function () { window.location.href = result.upload_redirect_path; } else { $("#modal-error-msg").text( - "We received data in an unexpected format from the server." + "We received data in an unexpected format from the server.", ); $("#errorModal").modal(); $("#file-progress").css("display", "none"); From 15f5d9ad91768f05663e9a211bcf08ca8dfd5eca Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 27 Nov 2024 08:17:27 -0800 Subject: [PATCH 2/8] veg/datamonkey-js#752 -- adding new meme options --- app/models/meme.js | 10 +- app/routes/meme.js | 5 + app/templates/meme/form.ejs | 2 +- app/templates/meme/msa_form.ejs | 243 ++++++++++++++++---------------- 4 files changed, 132 insertions(+), 128 deletions(-) diff --git a/app/models/meme.js b/app/models/meme.js index bad9ffcc..901a0e99 100644 --- a/app/models/meme.js +++ b/app/models/meme.js @@ -12,6 +12,10 @@ var MEME = mongoose.Schema({ results: Object, resample: Number, bootstrap: Boolean, + multiple_hits: String, + site_multihit: String, + rates: Number, + impute_states: String, }); MEME.add(AnalysisSchema); @@ -113,13 +117,13 @@ MEME.statics.spawn = function (fn, options, callback) { logger.error( "meme rename failed" + " Errored on line 113~ within models/meme.js :: move_cb " + - err + err, ); callback(err, null); } else { var move = Msa.removeTreeFromFile( meme_result.filepath, - meme_result.filepath + meme_result.filepath, ); move.then( (val) => { @@ -130,7 +134,7 @@ MEME.statics.spawn = function (fn, options, callback) { }, (reason) => { res.json(500, { error: "issue removing tree from file" }); - } + }, ); } } diff --git a/app/routes/meme.js b/app/routes/meme.js index a5958010..ed23b6ce 100644 --- a/app/routes/meme.js +++ b/app/routes/meme.js @@ -24,6 +24,11 @@ exports.invoke = function (req, res) { datatype: 0, gencodeid: postdata.gencodeid, mail: postdata.mail, + multiple_hits: postdata.multiple_hits, + site_multihit: postdata.site_multihit, + rates: parseInt(postdata.rates), + resample: parseInt(postdata.resample || 0), + impute_states: postdata.impute_states, }; //// Check advanced options diff --git a/app/templates/meme/form.ejs b/app/templates/meme/form.ejs index 420b0e2f..3bf8563e 100644 --- a/app/templates/meme/form.ejs +++ b/app/templates/meme/form.ejs @@ -1,7 +1,7 @@ <%- include("../includes/header.ejs") %>
<%- include("header.ejs") %> - <%- include("../partials/msa/form.ejs") %> + <%- include("./msa_form.ejs") %> <%- include("../includes/modal.ejs") %>
<%- include("../includes/footer.ejs") %> diff --git a/app/templates/meme/msa_form.ejs b/app/templates/meme/msa_form.ejs index 9723a403..382ad42a 100644 --- a/app/templates/meme/msa_form.ejs +++ b/app/templates/meme/msa_form.ejs @@ -1,136 +1,131 @@ -<%- include("../includes/header.ejs") %> -
- <%- include("header.ejs") %> - - - -
- -
> - -
- - -
- -
- - -
- -
has-error<% } %>"> - - -
- -
-
-
-
- -
-
- -
-
-
-

[Advanced setting, will result in MUCH SLOWER run time] Perform parametric bootstrap resampling to derive site-level null LRT distributions up to this many replicates per site. Recommended use for small to medium (<30 sequences) datasets.

- - -
+ + +
+ + > + +
+ + -
-
+
+
+ +
+ +
-
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
has-error<% } %>"> + + +
+ + + + +
-<%- include("../includes/footer.ejs") %> +
+ + + From 37550d929c05c6cb89650fc497c2c45ea229c343 Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 27 Nov 2024 18:21:15 -0500 Subject: [PATCH 3/8] add missing js form --- public/assets/js/fel/msa_form.js | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/public/assets/js/fel/msa_form.js b/public/assets/js/fel/msa_form.js index 593bc1ac..cf5ae502 100644 --- a/public/assets/js/fel/msa_form.js +++ b/public/assets/js/fel/msa_form.js @@ -1,4 +1,24 @@ $(function () { + function toggleSiteMultihit() { + const multipleHitsValue = $("#multiple-hits").val(); + const siteMultihitDropdown = $("#site-multihit"); + + if (multipleHitsValue === "None") { + siteMultihitDropdown.prop("disabled", true); + siteMultihitDropdown.val("Estimate"); // Set to default value if disabled + } else { + siteMultihitDropdown.prop("disabled", false); + } + } + + // Initial check on page load + toggleSiteMultihit(); + + // Bind change event to multiple_hits dropdown + $("#multiple-hits").change(function () { + toggleSiteMultihit(); + }); + $("form").submit(function (e) { e.preventDefault(); @@ -13,19 +33,19 @@ $(function () { formData.append("gencodeid", $("select[name='gencodeid']").val()); formData.append("ds_variation", $("#ds-variation").val()); formData.append("resample", $("#resample").val()); - formData.append("multiple_hits", $("select[name='multiple_hits']").val()); - formData.append("site_multihit", $("select[name='site_multihit']").val()); + formData.append("multiple_hits", $("#multiple-hits").val()); + formData.append("site_multihit", $("#site-multihit").val()); formData.append( "receive_mail", - $("input[name='receive_mail']").prop("checked"), + $("input[name='receive_mail']").prop("checked") ); formData.append("mail", $("input[name='mail']").val()); formData.append( "confidence_interval", - $("input[name='confidence-interval']").prop("checked"), + $("input[name='confidence-interval']").prop("checked") ); var action_url = $("#msa-form").attr("action"); @@ -66,7 +86,7 @@ $(function () { window.location.href = result.upload_redirect_path; } else { $("#modal-error-msg").text( - "We received data in an unexpected format from the server.", + "We received data in an unexpected format from the server." ); $("#errorModal").modal(); $("#file-progress").css("display", "none"); From 725505649d91fce66eb289951e8f7971a9d08584 Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 27 Nov 2024 18:40:35 -0500 Subject: [PATCH 4/8] #752 fel fix --- app/routes/fel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/fel.js b/app/routes/fel.js index 711919f7..1b8e2163 100644 --- a/app/routes/fel.js +++ b/app/routes/fel.js @@ -25,6 +25,7 @@ exports.uploadFile = function (req, res) { } }; + var fn = req.files.files.file, fel = new FEL(), postdata = req.body, @@ -33,6 +34,7 @@ exports.uploadFile = function (req, res) { ds_variation = postdata.ds_variation, resample = parseInt(postdata.resample); + fel.original_extension = path.basename(fn).split(".")[1]; fel.mail = postdata.mail; fel.ci = postdata.confidence_interval == "true"; @@ -150,8 +152,6 @@ exports.invoke = function (req, res) { // User Parameters fel.tagged_nwk_tree = postdata.nwk_tree; fel.analysis_type = postdata.analysis_type; - fel.multiple_hits = postdata.multiple_hits; // new - fel.site_multihit = postdata.site_multihit; // new fel.status = fel.status_stack[0]; fel.save(function (err, result) { From 967b22b8276e0b719ef9dc4f8ace6200eb065ed9 Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 27 Nov 2024 18:51:23 -0500 Subject: [PATCH 5/8] meme form update --- app/routes/meme.js | 1 + app/templates/meme/msa_form.ejs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routes/meme.js b/app/routes/meme.js index ed23b6ce..0676a86e 100644 --- a/app/routes/meme.js +++ b/app/routes/meme.js @@ -19,6 +19,7 @@ exports.invoke = function (req, res) { var fn = req.files.files.file; let postdata = req.body; //let resample = parseInt(postdata.resample); + console.log(postdata) let options = { datatype: 0, diff --git a/app/templates/meme/msa_form.ejs b/app/templates/meme/msa_form.ejs index 382ad42a..bb7cc8e0 100644 --- a/app/templates/meme/msa_form.ejs +++ b/app/templates/meme/msa_form.ejs @@ -127,5 +127,5 @@
- + From 9637a1d85226195fd62fc28836453d666a3a3803 Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 27 Nov 2024 18:52:16 -0500 Subject: [PATCH 6/8] meme form update --- public/assets/js/meme/form.js | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 public/assets/js/meme/form.js diff --git a/public/assets/js/meme/form.js b/public/assets/js/meme/form.js new file mode 100644 index 00000000..aa353589 --- /dev/null +++ b/public/assets/js/meme/form.js @@ -0,0 +1,68 @@ +$(function () { + $("form").submit(function (e) { + e.preventDefault(); + + $("#file-progress").removeClass("hidden"); + + var formData = new FormData(); + var file = document.getElementById("seq-file").files[0]; + var filename = document.getElementById("seq-file").files[0].name; + + formData.append("files", file); + formData.append("datatype", $("select[name='datatype']").val()); + formData.append("gencodeid", $("select[name='gencodeid']").val()); + formData.append("mail", $("input[name='mail']").val()); + + var action_url = $("#msa-form").attr("action"); + + var xhr = new XMLHttpRequest(); + + xhr.open("post", action_url, true); + + xhr.upload.onprogress = function (e) { + if (e.lengthComputable) { + var percentage = (e.loaded / e.total) * 100; + + $("#seq-file").css("display", "none"); + $(".progress .progress-bar").css("width", percentage + "%"); + } + }; + + xhr.onerror = function (e) { + $("#file-progress").html(e); + }; + + xhr.onload = function (res) { + // Replace field with green text, name of file + var result = JSON.parse(this.responseText); + + if (_.has(result, "error")) { + $("#modal-error-msg").text(result.error); + $("#errorModal").modal(); + $("#file-progress").css("display", "none"); + $("#seq-file").css("display", "block"); + $(".progress .progress-bar").css("width", "0%"); + } else if ("error" in result.analysis) { + $("#modal-error-msg").text(result.analysis.error); + $("#errorModal").modal(); + $("#file-progress").css("display", "none"); + $("#seq-file").css("display", "block"); + $(".progress .progress-bar").css("width", "0%"); + } else if ("upload_redirect_path" in result) { + window.location.href = result.upload_redirect_path; + } else { + $("#modal-error-msg").text( + "We received data in an unexpected format from the server." + ); + $("#errorModal").modal(); + $("#file-progress").css("display", "none"); + $("#seq-file").css("display", "block"); + $(".progress .progress-bar").css("width", "0%"); + } + }; + + xhr.send(formData); + }); + + $(".mail-group").change(datamonkey.helpers.validate_email); +}); From 7c28186bbc35346382c7c4bcce1cb04af5d13973 Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 27 Nov 2024 19:05:11 -0500 Subject: [PATCH 7/8] #752 meme fix --- app/models/meme.js | 60 +++++++---------- app/models/msa.js | 4 +- public/assets/js/meme/form.js | 120 +++++++++++++++++++++++----------- 3 files changed, 107 insertions(+), 77 deletions(-) diff --git a/app/models/meme.js b/app/models/meme.js index 901a0e99..3b42ba25 100644 --- a/app/models/meme.js +++ b/app/models/meme.js @@ -53,50 +53,41 @@ MEME.virtual("url").get(function () { return "http://" + setup.host + "/meme/" + this._id; }); -/** - * Shared API / Web request job spawn - */ + MEME.statics.spawn = function (fn, options, callback) { const Msa = mongoose.model("Msa"); - var meme = new this(); + const meme = new this(); - let gencodeid = options.gencodeid, - datatype = options.datatype; - - meme.mail = options.mail; + // Dynamically add all options to the meme object + Object.keys(options).forEach((key) => { + meme[key] = options[key]; + }); // Check advanced options - if (!_.isNaN(options.resample)) { - meme.resample = options.resample; - meme.bootstrap = true; - } else { - meme.bootstrap = false; - } + meme.bootstrap = !_.isNaN(options.resample); const connect_callback = function (data) { - if (data == "connected") { + if (data === "connected") { logger.log("connected"); } }; - Msa.parseFile(fn, datatype, gencodeid, (err, msa) => { + Msa.parseFile(fn, options.datatype, options.gencodeid, (err, msa) => { if (err) { callback(err); return; } + // Check if msa exceeds limitations if (msa.sites > meme.max_sites) { - const error = - "Site limit exceeded! Sites must be less than " + meme.max_sites; + const error = `Site limit exceeded! Sites must be less than ${meme.max_sites}`; logger.error(error); callback(error); return; } if (msa.sequences > meme.max_sequences) { - var error = - "Sequence limit exceeded! Sequences must be less than " + - meme.max_sequences; + const error = `Sequence limit exceeded! Sequences must be less than ${meme.max_sequences}`; logger.error(error); callback(error); return; @@ -112,32 +103,25 @@ MEME.statics.spawn = function (fn, options, callback) { return; } - function move_cb(err, result) { + function move_cb(err) { if (err) { logger.error( - "meme rename failed" + - " Errored on line 113~ within models/meme.js :: move_cb " + - err, + `meme rename failed. Error on line 113~ within models/meme.js :: move_cb ${err}`, ); callback(err, null); } else { - var move = Msa.removeTreeFromFile( - meme_result.filepath, - meme_result.filepath, - ); - move.then( - (val) => { - let to_send = meme; - to_send.upload_redirect_path = meme.upload_redirect_path; + Msa.removeTreeFromFile(meme_result.filepath, meme_result.filepath) + .then(() => { + meme.upload_redirect_path = meme.upload_redirect_path; this.submitJob(meme_result, connect_callback); callback(null, meme); - }, - (reason) => { - res.json(500, { error: "issue removing tree from file" }); - }, - ); + }) + .catch(() => { + callback(new Error("issue removing tree from file")); + }); } } + helpers.moveSafely(fn, meme_result.filepath, move_cb.bind(this)); }); }); diff --git a/app/models/msa.js b/app/models/msa.js index c3dfb6eb..a9cb7d86 100644 --- a/app/models/msa.js +++ b/app/models/msa.js @@ -65,12 +65,12 @@ Msa.virtual("genetic_code").get(function () { }); Msa.virtual("day_created_on").get(function () { - var time = moment(this.timestamp); + var time = moment.unix(this.timestamp); return time.format("YYYY-MMM-DD"); }); Msa.virtual("time_created_on").get(function () { - var time = moment(this.timestamp); + var time = moment.unix(this.timestamp); return time.format("HH:mm"); }); diff --git a/public/assets/js/meme/form.js b/public/assets/js/meme/form.js index aa353589..51f56d96 100644 --- a/public/assets/js/meme/form.js +++ b/public/assets/js/meme/form.js @@ -1,68 +1,114 @@ $(function () { + function toggleSiteMultihit() { + const multipleHitsValue = $("#multiple-hits").val(); + const siteMultihitDropdown = $("#site-multihit"); + + if (multipleHitsValue === "None") { + siteMultihitDropdown.prop("disabled", true); + siteMultihitDropdown.val("Estimate"); // Default value when disabled + } else { + siteMultihitDropdown.prop("disabled", false); + } + } + + // Initialize dependent dropdown states on page load + toggleSiteMultihit(); + + // Handle changes in multiple hits selection + $("#multiple-hits").change(function () { + toggleSiteMultihit(); + }); + + // Handle form submission $("form").submit(function (e) { e.preventDefault(); $("#file-progress").removeClass("hidden"); - var formData = new FormData(); - var file = document.getElementById("seq-file").files[0]; - var filename = document.getElementById("seq-file").files[0].name; + const formData = new FormData(); + + // File validation + const fileInput = document.getElementById("seq-file"); + const file = fileInput.files[0]; + if (!file) { + $("#modal-error-msg").text("Please select a file to upload."); + $("#errorModal").modal(); + return; + } formData.append("files", file); - formData.append("datatype", $("select[name='datatype']").val()); + + // Gather and validate form data formData.append("gencodeid", $("select[name='gencodeid']").val()); - formData.append("mail", $("input[name='mail']").val()); + formData.append("multiple_hits", $("#multiple-hits").val()); + formData.append("site_multihit", $("#site-multihit").val()); + formData.append("rates", $("#rates").val()); + formData.append("resample", $("#resample").val()); + formData.append("impute_states", $("#impute-states").val()); - var action_url = $("#msa-form").attr("action"); + const email = $("input[name='mail']").val(); + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + if (email && !emailRegex.test(email)) { + $("#modal-error-msg").text("Please enter a valid email address."); + $("#errorModal").modal(); + return; + } + formData.append("mail", email); - var xhr = new XMLHttpRequest(); + const actionUrl = $("#msa-form").attr("action"); - xhr.open("post", action_url, true); + // Create XMLHttpRequest + const xhr = new XMLHttpRequest(); + xhr.open("post", actionUrl, true); xhr.upload.onprogress = function (e) { if (e.lengthComputable) { - var percentage = (e.loaded / e.total) * 100; - - $("#seq-file").css("display", "none"); + const percentage = (e.loaded / e.total) * 100; $(".progress .progress-bar").css("width", percentage + "%"); } }; - xhr.onerror = function (e) { - $("#file-progress").html(e); + xhr.onerror = function () { + $("#modal-error-msg").text("An error occurred during the upload."); + $("#errorModal").modal(); }; - xhr.onload = function (res) { - // Replace field with green text, name of file - var result = JSON.parse(this.responseText); + xhr.onload = function () { + try { + const result = JSON.parse(this.responseText); - if (_.has(result, "error")) { - $("#modal-error-msg").text(result.error); - $("#errorModal").modal(); - $("#file-progress").css("display", "none"); - $("#seq-file").css("display", "block"); - $(".progress .progress-bar").css("width", "0%"); - } else if ("error" in result.analysis) { - $("#modal-error-msg").text(result.analysis.error); + if (result.error) { + $("#modal-error-msg").text(result.error); + $("#errorModal").modal(); + } else if (result.upload_redirect_path) { + window.location.href = result.upload_redirect_path; + } else { + $("#modal-error-msg").text( + "Unexpected response format from the server." + ); + $("#errorModal").modal(); + } + } catch (err) { + $("#modal-error-msg").text("Error parsing server response."); $("#errorModal").modal(); - $("#file-progress").css("display", "none"); - $("#seq-file").css("display", "block"); - $(".progress .progress-bar").css("width", "0%"); - } else if ("upload_redirect_path" in result) { - window.location.href = result.upload_redirect_path; - } else { - $("#modal-error-msg").text( - "We received data in an unexpected format from the server." - ); - $("#errorModal").modal(); - $("#file-progress").css("display", "none"); - $("#seq-file").css("display", "block"); + } finally { $(".progress .progress-bar").css("width", "0%"); + $("#file-progress").addClass("hidden"); } }; xhr.send(formData); }); - $(".mail-group").change(datamonkey.helpers.validate_email); + // Email validation on input + $("input[name='mail']").on("input", function () { + const email = $(this).val(); + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + + if (email && !emailRegex.test(email)) { + $(this).addClass("is-invalid"); + } else { + $(this).removeClass("is-invalid"); + } + }); }); From 7eb91e054d8b9fd775abf45280a3364c9877e2eb Mon Sep 17 00:00:00 2001 From: Steven Weaver Date: Wed, 4 Dec 2024 18:48:27 -0500 Subject: [PATCH 8/8] codeql resolutions --- app/models/meme.js | 1 - app/routes/meme.js | 2 -- 2 files changed, 3 deletions(-) diff --git a/app/models/meme.js b/app/models/meme.js index 3b42ba25..c66974d5 100644 --- a/app/models/meme.js +++ b/app/models/meme.js @@ -112,7 +112,6 @@ MEME.statics.spawn = function (fn, options, callback) { } else { Msa.removeTreeFromFile(meme_result.filepath, meme_result.filepath) .then(() => { - meme.upload_redirect_path = meme.upload_redirect_path; this.submitJob(meme_result, connect_callback); callback(null, meme); }) diff --git a/app/routes/meme.js b/app/routes/meme.js index 0676a86e..2ea13707 100644 --- a/app/routes/meme.js +++ b/app/routes/meme.js @@ -18,8 +18,6 @@ exports.form = function (req, res) { exports.invoke = function (req, res) { var fn = req.files.files.file; let postdata = req.body; - //let resample = parseInt(postdata.resample); - console.log(postdata) let options = { datatype: 0,