working
This commit is contained in:
parent
8db611bfc4
commit
da09e084c1
|
@ -7,7 +7,7 @@ import { PRERENDERED_ARTICLES_COUNT } from '../components/Views/Home'
|
|||
|
||||
const randomTopics = await apiClient.getRandomTopics({ amount: 12 })
|
||||
const articles = await apiClient.loadShoutsBy(
|
||||
{ by: { visibility: "public" }, amount: PRERENDERED_ARTICLES_COUNT, offset: 0 })
|
||||
{ by: { visibility: "public" }, limit: PRERENDERED_ARTICLES_COUNT, offset: 0 })
|
||||
|
||||
const { pathname, search } = Astro.url
|
||||
initRouter(pathname, search)
|
||||
|
|
|
@ -134,7 +134,7 @@ export const loadShoutsBy = async ({
|
|||
}): Promise<{ hasMore: boolean }> => {
|
||||
const newArticles = await apiClient.loadShoutsBy({
|
||||
by,
|
||||
amount: limit + 1,
|
||||
limit: limit + 1,
|
||||
offset
|
||||
})
|
||||
|
||||
|
|
|
@ -230,16 +230,18 @@ export const apiClient = {
|
|||
const resp = await privateGraphQLClient.query(myChats, payload).toPromise()
|
||||
return resp.data.myChats
|
||||
},
|
||||
loadAuthorsBy: async ({ by, amount = 50, offset = 0 }) => {
|
||||
const resp = await publicGraphQLClient.query(authorsLoadBy, { by, amount, offset }).toPromise()
|
||||
loadAuthorsBy: async ({ by, limit = 50, offset = 0 }) => {
|
||||
const resp = await publicGraphQLClient.query(authorsLoadBy, { by, limit, offset }).toPromise()
|
||||
console.debug(resp)
|
||||
return resp.data.loadShoutsBy
|
||||
},
|
||||
loadShoutsBy: async ({ by, amount = 50, offset = 0 }) => {
|
||||
const resp = await publicGraphQLClient.query(shoutsLoadBy, { by, amount, offset }).toPromise()
|
||||
loadShoutsBy: async ({ by, limit = 50, offset = 0 }) => {
|
||||
const resp = await publicGraphQLClient.query(shoutsLoadBy, { by, limit, offset }).toPromise()
|
||||
console.debug(resp)
|
||||
return resp.data.loadShoutsBy
|
||||
},
|
||||
loadReactionsBy: async ({ by, amount = REACTIONS_AMOUNT_PER_PAGE, offset = 0 }) => {
|
||||
const resp = await publicGraphQLClient.query(reactionsLoadBy, { by, amount, offset }).toPromise()
|
||||
loadReactionsBy: async ({ by, limit = REACTIONS_AMOUNT_PER_PAGE, offset = 0 }) => {
|
||||
const resp = await publicGraphQLClient.query(reactionsLoadBy, { by, limit, offset }).toPromise()
|
||||
return resp.data.loadReactionsBy
|
||||
},
|
||||
getChatMessages: async ({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export const isDev = import.meta.env.MODE === 'development'
|
||||
|
||||
export const apiBaseUrl = 'https://testapi.discours.io'
|
||||
// export const apiBaseUrl = 'https://testapi.discours.io'
|
||||
// export const apiBaseUrl = 'https://newapi.discours.io'
|
||||
// testapi.discours.io
|
||||
//export const apiBaseUrl = 'http://localhost:8080'
|
||||
export const apiBaseUrl = 'http://localhost:8080'
|
||||
|
|
Loading…
Reference in New Issue
Block a user