summaryrefslogtreecommitdiff
path: root/app/javascript/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/controllers')
-rw-r--r--app/javascript/controllers/timer_controller.js (renamed from app/javascript/controllers/activities/timer_controller.js)3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/controllers/activities/timer_controller.js b/app/javascript/controllers/timer_controller.js
index 11057c0..7714bad 100644
--- a/app/javascript/controllers/activities/timer_controller.js
+++ b/app/javascript/controllers/timer_controller.js
@@ -6,6 +6,7 @@ export default class extends Controller {
static values = {
start: Number,
+ postUrl: String,
}
initialize() {
@@ -29,7 +30,7 @@ export default class extends Controller {
} else if (this.counter === 0) {
Rails.ajax({
type: "POST",
- url: "/finish_activity",
+ url: this.postUrlValue,
});
}
}, 1000);