X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=00cb944d62dc6e6e9c08a26104773af0f9ebc3b3;hp=ad8c54c014148bec9fa063cbd00bacd2328439c5;hb=8d7e2786f5a67a1b9a77c742d7951e0efbe8747d;hpb=7192f4711467ae73a0f813189f8a4d8cca252bf1 diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index ad8c54c0..00cb944d 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -175,7 +175,7 @@ Vue.component('my-problems', { last_dt = this.problems[i].added; } } - ajax("/problems/" + variant, "GET", { + ajax("/problems/" + variant.name, "GET", { //TODO: use variant._id ? direction: direction, last_dt: last_dt, }, response => { @@ -201,7 +201,7 @@ Vue.component('my-problems', { }, sendNewProblem: function() { // Send it to the server and close modal - ajax("/problems/" + variant, "POST", { + ajax("/problems/" + variant.name, "POST", { //TODO: with variant._id ? fen: this.newProblem.fen, instructions: this.newProblem.instructions, solution: this.newProblem.solution,