mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix file uploading
This commit is contained in:
parent
86cff913fb
commit
e05d341952
3 changed files with 5 additions and 4 deletions
|
|
@ -92,7 +92,7 @@ export const uploadFileRequestResolver = authorized<
|
|||
uploadFileData = await authTrx((t) =>
|
||||
t.getRepository(UploadFile).save({
|
||||
url: input.url,
|
||||
userId: uid,
|
||||
user: { id: uid },
|
||||
fileName,
|
||||
status: UploadFileStatus.Initialized,
|
||||
contentType: input.contentType,
|
||||
|
|
@ -156,7 +156,6 @@ export const uploadFileRequestResolver = authorized<
|
|||
itemType: itemTypeForContentType(input.contentType),
|
||||
uploadFile: { id: uploadFileData.id },
|
||||
slug: generateSlug(uploadFilePathName),
|
||||
state: LibraryItemState.Succeeded,
|
||||
},
|
||||
uid
|
||||
)
|
||||
|
|
|
|||
|
|
@ -320,7 +320,10 @@ export const updateLibraryItem = async (
|
|||
): Promise<LibraryItem> => {
|
||||
const updatedLibraryItem = await authTrx(async (tx) => {
|
||||
const itemRepo = tx.withRepository(libraryItemRepository)
|
||||
await itemRepo.save({ id, ...libraryItem })
|
||||
await itemRepo.update(
|
||||
id,
|
||||
libraryItem as QueryDeepPartialEntity<LibraryItem>
|
||||
)
|
||||
|
||||
return itemRepo.findOneByOrFail({ id })
|
||||
})
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ export const savePage = async (
|
|||
url: input.url,
|
||||
title: input.title,
|
||||
userId: user.id,
|
||||
itemId: clientRequestId,
|
||||
slug,
|
||||
croppedPathname,
|
||||
parsedContent: parseResult.parsedContent,
|
||||
|
|
|
|||
Loading…
Reference in a new issue