|
|
|
@ -26,6 +26,7 @@ router.post('/', async function(req, res, next) {
@@ -26,6 +26,7 @@ router.post('/', async function(req, res, next) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (search.length === 34) { |
|
|
|
|
// looking for address
|
|
|
|
|
const address = await models.Address.findOne({ |
|
|
|
|
where: { |
|
|
|
@ -36,7 +37,7 @@ router.post('/', async function(req, res, next) {
@@ -36,7 +37,7 @@ router.post('/', async function(req, res, next) {
|
|
|
|
|
res.redirect(`/address/${address.address}/`); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if(search.length === 64) { |
|
|
|
|
// looking for transaction
|
|
|
|
|
const transaction = await models.Transaction.findOne({ |
|
|
|
|
where: { |
|
|
|
@ -58,6 +59,8 @@ router.post('/', async function(req, res, next) {
@@ -58,6 +59,8 @@ router.post('/', async function(req, res, next) {
|
|
|
|
|
res.redirect(`/block/${block.hash}/`); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
res.status(404).render('404'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|