summaryrefslogtreecommitdiff
path: root/static/js/controllers/comments_controller.js
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2024-02-23 17:48:30 -0600
committerHombreLaser <sebastian-440@live.com>2024-02-23 17:48:30 -0600
commit4aa78f692bc4346a7a565cdedae9acd1cd1e75dc (patch)
tree68341b1e0edc161ed84d710616854a03f9558281 /static/js/controllers/comments_controller.js
parentd218bdaac8e5c90a2bd7b7bf428ed09a726102c3 (diff)
Refactor javascript controller classes
Diffstat (limited to 'static/js/controllers/comments_controller.js')
-rw-r--r--static/js/controllers/comments_controller.js13
1 files changed, 1 insertions, 12 deletions
diff --git a/static/js/controllers/comments_controller.js b/static/js/controllers/comments_controller.js
index 08f9548..8989c5a 100644
--- a/static/js/controllers/comments_controller.js
+++ b/static/js/controllers/comments_controller.js
@@ -39,18 +39,7 @@ export class CommentsController extends BaseController {
}
async submit(event) {
- event.preventDefault();
- var form = new FormData(event.target);
- form.append("domain", `${window.location.protocol}//${window.location.host}`);
-
- try {
- const response = await fetch(`${this.comments_server_host}/api/comments?path=${this.post}`,
- { method: "POST", body: form });
-
- response.text().then((response_document) => {
- this.renderSubmitResponse(response_document);
- });
- } catch(error) {}
+ super.submit(event, `${this.comments_server_host}/api/comments?path=${this.post}`);
}
}