This commit is contained in:
zadam
2023-04-17 23:21:28 +02:00
parent 0e4a040ed8
commit e28fbf4617
6 changed files with 29 additions and 14 deletions

View File

@@ -48,7 +48,7 @@ export default class AttachmentActionsWidget extends BasicWidget {
async deleteAttachmentCommand() {
if (await dialogService.confirm(`Are you sure you want to delete attachment '${this.attachment.title}'?`)) {
await server.remove(`notes/${this.attachment.parentId}/attachments/${this.attachment.attachmentId}`);
await server.remove(`attachments/${this.attachment.attachmentId}`);
toastService.showMessage(`Attachment '${this.attachment.title}' has been deleted.`);
}
@@ -56,7 +56,7 @@ export default class AttachmentActionsWidget extends BasicWidget {
async convertAttachmentIntoNoteCommand() {
if (await dialogService.confirm(`Are you sure you want to convert attachment '${this.attachment.title}' into a separate note?`)) {
const {note: newNote} = await server.post(`notes/${this.attachment.parentId}/attachments/${this.attachment.attachmentId}/convert-to-note`)
const {note: newNote} = await server.post(`attachments/${this.attachment.attachmentId}/convert-to-note`)
toastService.showMessage(`Attachment '${this.attachment.title}' has been converted to note.`);