fix that fucking thing now
This commit is contained in:
parent
9e57568642
commit
9c6ea7e1be
@ -5,6 +5,7 @@ import config
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os, logging
|
import os, logging
|
||||||
|
|
||||||
|
lists_to_serve = archive.list_tables_db(config.db['database'], config.db['host'], config.db['user'], config.db['password'])
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
@ -22,6 +23,8 @@ def lists():
|
|||||||
|
|
||||||
@app.route('/search')
|
@app.route('/search')
|
||||||
def searh():
|
def searh():
|
||||||
|
|
||||||
|
global lists_to_serve
|
||||||
|
|
||||||
if len(request.args) < 1:
|
if len(request.args) < 1:
|
||||||
# q: list all table or keep predefined lists_to_serve?
|
# q: list all table or keep predefined lists_to_serve?
|
||||||
@ -36,6 +39,8 @@ def searh():
|
|||||||
return "no keyword..."
|
return "no keyword..."
|
||||||
|
|
||||||
if l_arg != "all" and l_arg not in lists_to_serve:
|
if l_arg != "all" and l_arg not in lists_to_serve:
|
||||||
|
print("list '" + l_arg + "' does not exist")
|
||||||
|
print(lists_to_serve)
|
||||||
return "list '" + l_arg + "' does not exist"
|
return "list '" + l_arg + "' does not exist"
|
||||||
|
|
||||||
if f_arg not in ['content', 'from']:
|
if f_arg not in ['content', 'from']:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user