refactor: use correct endpoint when uploading file to shared vault note

This commit is contained in:
Aman Harwara
2023-08-24 15:54:47 +05:30
parent fcaaf549b8
commit 999bbde1b0
5 changed files with 31 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ import Icon from '../Icon/Icon'
import DecoratedInput from '../Input/DecoratedInput'
import LinkedItemSearchResults from './LinkedItemSearchResults'
import { LinkedItemsSectionItem } from './LinkedItemsSectionItem'
import { DecryptedItem } from '@standardnotes/snjs'
import { DecryptedItem, SNNote } from '@standardnotes/snjs'
import { useItemLinks } from '@/Hooks/useItemLinks'
import { mergeRefs } from '@/Hooks/mergeRefs'
@@ -41,7 +41,7 @@ const LinkedItemsPanel = ({ item }: { item: DecryptedItem }) => {
return
}
void application.filesController.selectAndUploadNewFiles((file) => {
void application.filesController.selectAndUploadNewFiles(item instanceof SNNote ? item : undefined, (file) => {
void linkItems(item, file)
})
}