diff --git a/frontend/src/ofrak/remote_resource.js b/frontend/src/ofrak/remote_resource.js index 77cad8187..059d32ba7 100644 --- a/frontend/src/ofrak/remote_resource.js +++ b/frontend/src/ofrak/remote_resource.js @@ -468,13 +468,13 @@ export class RemoteResource extends Resource { return find_replace_results; } - async add_comment(optional_range, comment) { + async add_comment(optional_range, comment_text) { await fetch(`${this.uri}/add_comment`, { method: "POST", headers: { "Content-Type": "application/json", }, - body: JSON.stringify([optional_range, comment]), + body: JSON.stringify([optional_range, comment_text]), }).then(async (r) => { if (!r.ok) { throw Error(JSON.stringify(await r.json(), undefined, 2)); @@ -508,13 +508,13 @@ export class RemoteResource extends Resource { await this.update_script(); } - async delete_comment(optional_range) { + async delete_comment(optional_range, comment_text) { await fetch(`${this.uri}/delete_comment`, { method: "POST", headers: { "Content-Type": "application/json", }, - body: JSON.stringify(optional_range), + body: JSON.stringify([optional_range, comment_text]), }).then(async (r) => { if (!r.ok) { throw Error(JSON.stringify(await r.json(), undefined, 2)); diff --git a/frontend/src/ofrak/resource.js b/frontend/src/ofrak/resource.js index c9241de6e..f442ae2f1 100644 --- a/frontend/src/ofrak/resource.js +++ b/frontend/src/ofrak/resource.js @@ -365,11 +365,11 @@ export class Resource { throw new NotImplementedError("summarize_tree"); } - async add_comment(optional_range, comment) { + async add_comment(optional_range, comment_text) { throw new NotImplementedError("add_comment"); } - async delete_comment(optional_range) { + async delete_comment(optional_range, comment_text) { throw new NotImplementedError("delete_comment"); } diff --git a/frontend/src/resource/ResourceTreeNode.svelte b/frontend/src/resource/ResourceTreeNode.svelte index 30df8cfcb..5325e62c8 100644 --- a/frontend/src/resource/ResourceTreeNode.svelte +++ b/frontend/src/resource/ResourceTreeNode.svelte @@ -244,15 +244,17 @@ > {rootResource.get_caption()} - {#await commentsPromise then comments} - {#each comments as comment} -