From 23a110eb05f24d2bb0fbe07361d79c8791ce8c7f Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Thu, 18 Jul 2024 17:31:20 +0700 Subject: [PATCH] Update types --- src/services/datahub/generated-query.ts | 2 ++ src/services/datahub/posts/query.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/datahub/generated-query.ts b/src/services/datahub/generated-query.ts index 6eb441d0d..5b525c935 100644 --- a/src/services/datahub/generated-query.ts +++ b/src/services/datahub/generated-query.ts @@ -498,6 +498,8 @@ export type FindPostsFilter = { OR?: InputMaybe> activeStaking?: InputMaybe approvedInRootPost?: InputMaybe + /** Do not provide this parameter if you do not need include moderation filter in response. */ + blockedByModeration?: InputMaybe createdAtTime?: InputMaybe /** Datetime as ISO 8601 string */ createdAtTimeGt?: InputMaybe diff --git a/src/services/datahub/posts/query.ts b/src/services/datahub/posts/query.ts index 90348913e..21d232a97 100644 --- a/src/services/datahub/posts/query.ts +++ b/src/services/datahub/posts/query.ts @@ -107,11 +107,11 @@ async function getPaginatedPostIdsByRootPostId({ }, ], } - : ({ + : { rootPostId: postId, approvedInRootPost: !onlyDisplayUnapprovedMessages, blockedByModeration: false, - } as any), + }, orderBy: onlyDisplayUnapprovedMessages ? 'createdAtTime' : 'approvedInRootPostAtTime',