mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Update savedAt in update page api
This commit is contained in:
parent
e5b0339036
commit
86dccc0d44
4 changed files with 6 additions and 2 deletions
|
|
@ -2392,6 +2392,7 @@ export type UpdatePageInput = {
|
|||
byline?: InputMaybe<Scalars['String']>;
|
||||
description?: InputMaybe<Scalars['String']>;
|
||||
pageId: Scalars['ID'];
|
||||
savedAt?: InputMaybe<Scalars['Date']>;
|
||||
title?: InputMaybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1836,6 +1836,7 @@ input UpdatePageInput {
|
|||
byline: String
|
||||
description: String
|
||||
pageId: ID!
|
||||
savedAt: Date
|
||||
title: String
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,10 @@ export const updatePageResolver = authorized<
|
|||
|
||||
const pageData = {
|
||||
id: input.pageId,
|
||||
title: input.title || undefined,
|
||||
description: input.description || '',
|
||||
title: input.title ?? undefined,
|
||||
description: input.description ?? undefined,
|
||||
author: input.byline ?? undefined,
|
||||
savedAt: input.savedAt ? new Date(input.savedAt) : undefined,
|
||||
}
|
||||
|
||||
const updateResult = await updatePage(input.pageId, pageData, { ...ctx, uid })
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@ const schema = gql`
|
|||
title: String
|
||||
description: String
|
||||
byline: String
|
||||
savedAt: Date
|
||||
}
|
||||
|
||||
type UpdatePageSuccess {
|
||||
|
|
|
|||
Loading…
Reference in a new issue