Skip to content

Commit

Permalink
Update indexer query and enable injest, revlaidate service
Browse files Browse the repository at this point in the history
  • Loading branch information
AshakaE committed Nov 23, 2023
1 parent 3a092b2 commit 35c95f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Indexer/Provider/graph.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Hash = {

export const query = gql`
query ($unixtime: Int) {
ipfshashs(where: { createdAt_gt: $unixtime }, first: 1000) {
ipfshashs(where: { createdAt_gt: $unixtime }, orderBy: createdAt) {
id
block
createdAt
Expand Down
26 changes: 13 additions & 13 deletions src/Indexer/Store/store.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Tag from '../../Database/Entities/tag.entity'
import Category from '../../Database/Entities/category.entity'
import { Hash } from '../Provider/graph.service'
import Activity, { Status } from '../../Database/Entities/activity.entity'
import { RevalidatePageService } from '../../App/revalidatePage/revalidatePage.service'
import { RevalidateEndpoints, RevalidatePageService } from '../../App/revalidatePage/revalidatePage.service'
import IqSubscription from '../../Database/Entities/IqSubscription'
import Notification from '../../Database/Entities/notification.entity'
import AutoInjestService from '../../App/utils/auto-injest'
Expand Down Expand Up @@ -163,14 +163,14 @@ class DBStoreService {
} as Activity),
)

// await this.revalidate.revalidatePage(
// RevalidateEndpoints.STORE_WIKI,
// existWiki.user.id,
// existWiki.id,
// existWiki.promoted,
// )
await this.revalidate.revalidatePage(
RevalidateEndpoints.STORE_WIKI,
existWiki.user.id,
existWiki.id,
existWiki.promoted,
)

// await this.iqInjest.initiateInjest()
await this.iqInjest.initiateInjest()
return true
}

Expand Down Expand Up @@ -202,11 +202,11 @@ class DBStoreService {
type: Status.CREATED,
} as Activity),
)
// await this.revalidate.revalidatePage(
// RevalidateEndpoints.STORE_WIKI,
// newWiki.user.id,
// newWiki.id,
// )
await this.revalidate.revalidatePage(
RevalidateEndpoints.STORE_WIKI,
newWiki.user.id,
newWiki.id,
)
return true
}
}
Expand Down

0 comments on commit 35c95f9

Please sign in to comment.