File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
frontend-main/src/composables Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { Ref } from 'vue';
33
44import { infiniteQueryOptions , useInfiniteQuery , useQueryClient } from '@tanstack/vue-query' ;
55import { refDebounced } from '@vueuse/core' ;
6- import { postSchema } from 'api-main/types/feed' ;
6+ import { postWithRepostSchema } from 'api-main/types/feed' ;
77import { storeToRefs } from 'pinia' ;
88import { 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 ) => {
Original file line number Diff line number Diff 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} ) ;
6463export type PostsQuery = Static < typeof PostsQuerySchema > ;
6564
You can’t perform that action at this time.
0 commit comments