diff --git a/frontend/src/features/qa/page-qa-toolbar.ts b/frontend/src/features/qa/page-qa-toolbar.ts index 510edb038b..e275a923c4 100644 --- a/frontend/src/features/qa/page-qa-toolbar.ts +++ b/frontend/src/features/qa/page-qa-toolbar.ts @@ -404,6 +404,36 @@ export class PageQAToolbar extends TailwindElement { } } + private async editComment(commentId: string, text: string): Promise { + try { + await this.api.fetch( + `/orgs/${this.orgId}/crawls/${this.itemId}/pages/${this.pageId}/notes`, + this.authState!, + { + method: "PATCH", + body: JSON.stringify({ + id: commentId, + text, + }), + }, + ); + + this.fetchPage(); + + this.notify.toast({ + message: msg("Successfully updated comment."), + variant: "success", + icon: "check2-circle", + }); + } catch { + this.notify.toast({ + message: msg("Sorry, couldn't update comment at this time."), + variant: "danger", + icon: "exclamation-octagon", + }); + } + } + private async deleteComment(commentId: string): Promise { try { await this.api.fetch(