fix that fucking thing now

This commit is contained in:
gauthiier 2019-12-29 17:57:27 +01:00
parent 9e57568642
commit 9c6ea7e1be

View File

@ -5,6 +5,7 @@ import config
from datetime import datetime
import os, logging
lists_to_serve = archive.list_tables_db(config.db['database'], config.db['host'], config.db['user'], config.db['password'])
@app.route('/')
def index():
@ -22,6 +23,8 @@ def lists():
@app.route('/search')
def searh():
global lists_to_serve
if len(request.args) < 1:
# q: list all table or keep predefined lists_to_serve?
@ -36,6 +39,8 @@ def searh():
return "no keyword..."
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"
if f_arg not in ['content', 'from']: