Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SuaYoo committed Mar 11, 2024
1 parent 0ebad33 commit 2136508
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions frontend/src/features/qa/page-qa-toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,36 @@ export class PageQAToolbar extends TailwindElement {
}
}

private async editComment(commentId: string, text: string): Promise<void> {
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<void> {
try {
await this.api.fetch(
Expand Down

0 comments on commit 2136508

Please sign in to comment.