Skip to content

Commit

Permalink
feat: update updatedAt when parcel or estate metadata is updated (dec…
Browse files Browse the repository at this point in the history
  • Loading branch information
nachomazzara authored Jul 26, 2021
1 parent 8391c2f commit 588939f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions indexer/src/handlers/estate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export function handleCreateEstate(event: CreateEstate): void {
let nft = new NFT(id)
nft.name = estateData.name
nft.searchText = toLowerCase(estateData.name)
nft.createdAt = event.block.timestamp
nft.updatedAt = event.block.timestamp
nft.save()
}

Expand Down Expand Up @@ -149,6 +151,7 @@ export function handleUpdate(event: Update): void {

let nft = new NFT(id)
nft.name = estateData.name
nft.updatedAt = event.block.timestamp
nft.save()
}

Expand Down
1 change: 1 addition & 0 deletions indexer/src/handlers/parcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function handleUpdate(event: Update): void {
let nft = new NFT(id)
nft.name = parcelData.name
nft.searchText = getParcelText(parcel, parcelData.name)
nft.updatedAt = event.block.timestamp
nft.save()
}

Expand Down

0 comments on commit 588939f

Please sign in to comment.