Skip to content

Commit 762af36

Browse files
committed
refactor: polish
1 parent a29c594 commit 762af36

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/frontend-main/src/composables/useUserPosts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Ref } from 'vue';
33

44
import { infiniteQueryOptions, useInfiniteQuery, useQueryClient } from '@tanstack/vue-query';
55
import { refDebounced } from '@vueuse/core';
6-
import { postSchema } from 'api-main/types/feed';
6+
import { postWithRepostSchema } from 'api-main/types/feed';
77
import { storeToRefs } from 'pinia';
88
import { ref } from 'vue';
99

@@ -29,11 +29,11 @@ export function userPosts(params: Params) {
2929
queryKey: ['posts', params.userAddress, debouncedFilterAmount],
3030
queryFn: async ({ pageParam = 0 }) => {
3131
const queryClient = useQueryClient();
32-
const res = await fetch(`${apiRoot}/posts?address=${params.userAddress.value}&offset=${pageParam}&limit=${LIMIT}&minQuantity=${debouncedFilterAmount.value}&withReposts=true`);
32+
const res = await fetch(`${apiRoot}/posts?address=${params.userAddress.value}&offset=${pageParam}&limit=${LIMIT}&minQuantity=${debouncedFilterAmount.value}`);
3333
const json = await res.json();
3434

3535
// Check if the fetched rows match the post schema
36-
const checkedRows = checkRowsSchema(postSchema, json.rows ?? []) as PostWithRepost[];
36+
const checkedRows = checkRowsSchema(postWithRepostSchema, json.rows ?? []) as PostWithRepost[];
3737

3838
// Update the query cache with the posts
3939
checkedRows.forEach((row) => {

packages/lib-api-types/src/gets/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export const PostsQuerySchema = t.Object({
5959
offset: t.Optional(t.Number()),
6060
address: t.String(),
6161
minQuantity: t.Optional(t.String()),
62-
withReposts: t.Optional(t.Boolean()),
6362
});
6463
export type PostsQuery = Static<typeof PostsQuerySchema>;
6564

0 commit comments

Comments
 (0)