Skip to content

Commit

Permalink
Add document to the search query
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic committed Oct 12, 2023
1 parent 72849eb commit 565eb69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/api/src/controllers/MainController.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ class MainController {
if (dataContract) {
return response.send({dataContract})
}
// search block by height
const document = await this.dataContractsDAO.getDataContractByIdentifier(query)

if (document) {
return response.send({document})
}
}

response.status(404).send({message: 'not found'})
Expand Down

0 comments on commit 565eb69

Please sign in to comment.