mirror of
https://github.com/oxen-io/oxen-observer.git
synced 2023-12-14 09:22:54 +01:00
gracefully fail on /search endpoint with no query
This commit is contained in:
parent
feb491cdda
commit
a7cf7f8769
|
@ -535,7 +535,7 @@ def show_tx(txid, more_details=False):
|
||||||
def search():
|
def search():
|
||||||
lmq, lokid = lmq_connection()
|
lmq, lokid = lmq_connection()
|
||||||
info = FutureJSON(lmq, lokid, 'rpc.get_info', 1)
|
info = FutureJSON(lmq, lokid, 'rpc.get_info', 1)
|
||||||
val = flask.request.args.get('value').strip()
|
val = (flask.request.args.get('value') or '').strip()
|
||||||
|
|
||||||
if val and len(val) < 10 and val.isdigit(): # Block height
|
if val and len(val) < 10 and val.isdigit(): # Block height
|
||||||
return show_block(val)
|
return show_block(val)
|
||||||
|
|
Loading…
Reference in a new issue