fixes
This commit is contained in:
parent
6e37701420
commit
20a368fa6b
|
@ -32,8 +32,8 @@ export default gql`
|
||||||
createdAt
|
createdAt
|
||||||
publishedAt
|
publishedAt
|
||||||
stat {
|
stat {
|
||||||
# _id: viewed
|
_id: viewed
|
||||||
# viewed
|
viewed
|
||||||
reacted
|
reacted
|
||||||
rating
|
rating
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,5 +9,5 @@ export const loadAuthorsBy = async (by?: any): Promise<void> => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadChats = async (): Promise<void> => {
|
export const loadChats = async (): Promise<void> => {
|
||||||
return await apiClient.getChats({ limit: 0, offset: 50 })
|
return await apiClient.getChats({ limit: 50, offset: 0 })
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,6 +249,7 @@ export const apiClient = {
|
||||||
slug
|
slug
|
||||||
})
|
})
|
||||||
.toPromise()
|
.toPromise()
|
||||||
|
if (resp.error) console.debug(resp)
|
||||||
return resp.data.loadShout
|
return resp.data.loadShout
|
||||||
},
|
},
|
||||||
getShouts: async (options: LoadShoutsOptions) => {
|
getShouts: async (options: LoadShoutsOptions) => {
|
||||||
|
@ -257,12 +258,12 @@ export const apiClient = {
|
||||||
options
|
options
|
||||||
})
|
})
|
||||||
.toPromise()
|
.toPromise()
|
||||||
// console.debug(resp)
|
if (resp.error) console.debug(resp)
|
||||||
return resp.data.loadShouts
|
return resp.data.loadShouts
|
||||||
},
|
},
|
||||||
getReactionsBy: async ({ by, limit = REACTIONS_AMOUNT_PER_PAGE, offset = 0 }) => {
|
getReactionsBy: async ({ by, limit = REACTIONS_AMOUNT_PER_PAGE, offset = 0 }) => {
|
||||||
const resp = await publicGraphQLClient.query(reactionsLoadBy, { by, limit, offset }).toPromise()
|
const resp = await publicGraphQLClient.query(reactionsLoadBy, { by, limit, offset }).toPromise()
|
||||||
resp.error ?? console.error(resp.error)
|
console.error(resp)
|
||||||
return resp.data.loadReactionsBy
|
return resp.data.loadReactionsBy
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user