浏览代码

Cleanup; call update_sites() before API requests.

pull/24/head
Ben Kurtovic 9 年前
父节点
当前提交
aef27a53a1
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      app.fcgi
  2. +1
    -1
      templates/api.mako

+ 1
- 1
app.fcgi 查看文件

@@ -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 查看文件

@@ -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)}


正在加载...
取消
保存