Procházet zdrojové kódy

Cleanup; call update_sites() before API requests.

pull/24/head
Ben Kurtovic před 9 roky
rodič
revize
aef27a53a1
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. +1
    -1
      app.fcgi
  2. +1
    -1
      templates/api.mako

+ 1
- 1
app.fcgi Zobrazit soubor

@@ -49,7 +49,6 @@ def setup_app():
cache.last_background_updates = {}

getLogger("earwigbot.wiki.cvworker").setLevel(INFO)
# getLogger().handlers ....
globalize()

@app.before_request
@@ -107,6 +106,7 @@ def api_json():

format = request.args.get("format", "json")
if format in ["json", "jsonfm"]:
update_sites()
try:
result = handle_api_request()
except Exception as exc:


+ 1
- 1
templates/api.mako Zobrazit soubor

@@ -14,7 +14,7 @@
% endfor
${do_indent(indent)}
}
% elif isinstance(obj, (type([]), type(()))):
% elif isinstance(obj, (list, tuple, set)):
[
% for elem in obj:
${do_indent(indent + 1)}


Načítá se…
Zrušit
Uložit