mirror of
https://github.com/kvazar-network/webapp.git
synced 2025-02-05 03:34:19 +00:00
make strict transaction request
This commit is contained in:
parent
b0d36b203d
commit
fb3b1a1f58
@ -128,30 +128,27 @@ class MainController extends AbstractController
|
|||||||
{
|
{
|
||||||
$index = new \Kvazar\Index\Manticore();
|
$index = new \Kvazar\Index\Manticore();
|
||||||
|
|
||||||
$records = $index->get(
|
foreach ($index->get(
|
||||||
'',
|
'',
|
||||||
[
|
[
|
||||||
'crc32_transaction' => crc32(
|
'crc32_transaction' => crc32(
|
||||||
$request->get('transaction')
|
$request->get('transaction')
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
);
|
) as $record)
|
||||||
|
|
||||||
if (empty($records))
|
|
||||||
{
|
{
|
||||||
throw $this->createNotFoundException();
|
if ($record['transaction'] === $request->get('transaction'))
|
||||||
|
{
|
||||||
|
return $this->render(
|
||||||
|
'default/main/transaction.html.twig',
|
||||||
|
[
|
||||||
|
'request' => $request,
|
||||||
|
'record' => $record
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$record = reset(
|
throw $this->createNotFoundException();
|
||||||
$records
|
|
||||||
);
|
|
||||||
|
|
||||||
return $this->render(
|
|
||||||
'default/main/transaction.html.twig',
|
|
||||||
[
|
|
||||||
'request' => $request,
|
|
||||||
'record' => $record
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user