From b6081275edefe500b8dd8b5239e7ab3dd7d633a2 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 18 Apr 2020 15:48:04 +0200 Subject: KB51 Add handler for post links. Change-Id: Icb36da42fcf085ec541ba70c1421e8635d295974 --- .../META-INF/resources/lazychat/MlkLazychatSubmissionForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/resources') diff --git a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js index 5b67cee..e43e135 100644 --- a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js +++ b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js @@ -71,7 +71,7 @@ export class MlkLazychatSubmissionForm extends HTMLElement { connectedCallback() { if (this.editedId !== null) { this.mainForm.method = "post"; - this.mainForm.action = `/lazychat/p/${this.editedId}/edit`; + this.mainForm.action = `/lazychat/${this.editedId}/edit`; } } @@ -89,7 +89,7 @@ export class MlkLazychatSubmissionForm extends HTMLElement { return; } - let fetchUrl = new URL(`/lazychat/p/${this.editedId}`, document.URL); + let fetchUrl = new URL(`/posts/${this.editedId}`, document.URL); let r = await fetch(fetchUrl); if (!r.ok) { -- cgit v1.2.3