mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Update page content and state if failed to parse
This commit is contained in:
parent
2aa0618d28
commit
ca0f58ee22
1 changed files with 6 additions and 1 deletions
|
|
@ -408,7 +408,7 @@ export const getArticleResolver: ResolverFn<
|
|||
Record<string, unknown>,
|
||||
WithDataSourcesContext,
|
||||
QueryArticleArgs
|
||||
> = async (_obj, { slug }, { claims }) => {
|
||||
> = async (_obj, { slug }, { claims, pubsub }) => {
|
||||
try {
|
||||
if (!claims?.uid) {
|
||||
return { errorCodes: [ArticleErrorCode.Unauthorized] }
|
||||
|
|
@ -438,6 +438,11 @@ export const getArticleResolver: ResolverFn<
|
|||
) {
|
||||
page.content = UNPARSEABLE_CONTENT
|
||||
page.description = UNPARSEABLE_CONTENT
|
||||
page.state = ArticleSavingRequestStatus.Failed
|
||||
await updatePage(page.id, page, {
|
||||
uid: claims.uid,
|
||||
pubsub,
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue