잉여개발기 1 năm trước cách đây
mục cha
commit
ba557e7d65
100 tập tin đã thay đổi với 451 bổ sung451 xóa
  1. 2 2
      app.py
  2. 1 1
      route/api_image_view.py
  3. 1 1
      route/api_skin_info.py
  4. 1 1
      route/api_user_info.py
  5. 1 1
      route/api_version.py
  6. 3 3
      route/bbs_delete.py
  7. 4 4
      route/bbs_make.py
  8. 3 3
      route/bbs_w.py
  9. 3 3
      route/bbs_w_comment_tool.py
  10. 2 2
      route/bbs_w_delete.py
  11. 13 13
      route/bbs_w_edit.py
  12. 3 3
      route/bbs_w_hide.py
  13. 2 2
      route/bbs_w_pinned.py
  14. 9 9
      route/bbs_w_post.py
  15. 3 3
      route/bbs_w_tool.py
  16. 22 22
      route/edit.py
  17. 1 1
      route/edit_backlink_reset.py
  18. 12 12
      route/edit_delete.py
  19. 6 6
      route/edit_delete_file.py
  20. 9 9
      route/edit_delete_multiple.py
  21. 19 19
      route/edit_move.py
  22. 4 4
      route/edit_request.py
  23. 17 17
      route/edit_revert.py
  24. 15 15
      route/edit_upload.py
  25. 5 5
      route/filter_all.py
  26. 18 18
      route/filter_all_add.py
  27. 3 3
      route/filter_all_delete.py
  28. 6 6
      route/give_admin_groups.py
  29. 6 6
      route/give_delete_admin_group.py
  30. 15 15
      route/give_user_ban.py
  31. 8 8
      route/give_user_fix.py
  32. 1 1
      route/go_api_topic.py
  33. 1 1
      route/go_main_func_easter_egg.py
  34. 2 2
      route/list_acl.py
  35. 2 2
      route/list_admin.py
  36. 3 3
      route/list_admin_auth_use.py
  37. 3 3
      route/list_admin_group.py
  38. 2 2
      route/list_image_file.py
  39. 2 2
      route/list_long_page.py
  40. 2 2
      route/list_no_link.py
  41. 2 2
      route/list_please.py
  42. 2 2
      route/list_title_index.py
  43. 2 2
      route/list_user.py
  44. 8 8
      route/list_user_check.py
  45. 4 4
      route/list_user_check_delete.py
  46. 2 2
      route/login_find.py
  47. 8 8
      route/login_find_email.py
  48. 5 5
      route/login_find_email_check.py
  49. 6 6
      route/login_find_key.py
  50. 9 9
      route/login_login.py
  51. 7 7
      route/login_login_2fa.py
  52. 7 7
      route/login_login_2fa_email.py
  53. 1 1
      route/login_logout.py
  54. 13 13
      route/login_register.py
  55. 4 4
      route/login_register_email.py
  56. 2 2
      route/login_register_email_check.py
  57. 3 3
      route/login_register_submit.py
  58. 3 3
      route/main_func_error_404.py
  59. 1 1
      route/main_search.py
  60. 1 1
      route/main_search_deep.py
  61. 1 1
      route/main_search_goto.py
  62. 2 2
      route/main_setting.py
  63. 4 4
      route/main_setting_email_test.py
  64. 5 5
      route/main_setting_external.py
  65. 5 5
      route/main_setting_head.py
  66. 5 5
      route/main_setting_main.py
  67. 5 5
      route/main_setting_main_logo.py
  68. 5 5
      route/main_setting_phrase.py
  69. 5 5
      route/main_setting_robot.py
  70. 5 5
      route/main_setting_sitemap.py
  71. 5 5
      route/main_setting_sitemap_set.py
  72. 5 5
      route/main_setting_skin_set.py
  73. 5 5
      route/main_setting_top_menu.py
  74. 6 6
      route/main_sys_restart.py
  75. 5 5
      route/main_sys_shutdown.py
  76. 6 6
      route/main_sys_update.py
  77. 2 2
      route/main_tool_admin.py
  78. 2 2
      route/main_tool_other.py
  79. 2 2
      route/main_tool_redirect.py
  80. 1 1
      route/main_view.py
  81. 1 1
      route/main_view_file.py
  82. 3 3
      route/main_view_image.py
  83. 2 2
      route/n_bbs_in.py
  84. 2 2
      route/n_bbs_main.py
  85. 2 2
      route/n_bbs_w_set.py
  86. 2 2
      route/n_edit_move_all.py
  87. 2 2
      route/n_give_auth.py
  88. 2 2
      route/n_list_history.py
  89. 2 2
      route/n_list_old_page.py
  90. 2 2
      route/n_list_recent_block.py
  91. 2 2
      route/n_list_recent_change.py
  92. 2 2
      route/n_list_recent_discuss.py
  93. 2 2
      route/n_list_user_check_submit.py
  94. 2 2
      route/n_main_redirect.py
  95. 2 2
      route/n_setting_404_page.py
  96. 2 2
      route/n_topic_list.py
  97. 2 2
      route/n_user_rankup.py
  98. 2 2
      route/n_w_watch_list.py
  99. 5 5
      route/recent_app_submit.py
  100. 4 4
      route/recent_change.py

+ 2 - 2
app.py

@@ -335,7 +335,7 @@ def back_up(data_db_set):
 
         threading.Timer(60 * 60 * back_time, back_up, [data_db_set]).start()
 
-def do_every_day():
+async def do_every_day():
     with get_db_connect() as conn:
         curs = conn.cursor()
         
@@ -406,7 +406,7 @@ def do_every_day():
         # 칭호 관리
         curs.execute(db_change("select id from user_set where name = 'user_title' and data = '✅'"))
         for for_a in curs.fetchall():
-            if acl_check('', 'all_admin_auth', '', for_a[0]) == 1:
+            if await acl_check('', 'all_admin_auth', '', for_a[0]) == 1:
                 curs.execute(db_change("update user_set set data = '☑️' where name = 'user_title' and data = '✅' and id = ?"), [for_a[0]])
 
         threading.Timer(60 * 60 * 24, do_every_day).start()

+ 1 - 1
route/api_image_view.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_image_view(name = 'Test'):
+async def api_image_view(name = 'Test'):
     with get_db_connect() as conn:
         if os.path.exists(os.path.join(load_image_url(conn), name)):
             return flask.jsonify({ "exist" : "1" })

+ 1 - 1
route/api_skin_info.py

@@ -2,7 +2,7 @@ import urllib.request
 
 from .tool.func import *
 
-def api_skin_info(name = ''):
+async def api_skin_info(name = ''):
     with get_db_connect() as conn:
         name = skin_check(conn) if name == '' else './views/' + name + '/index.html'
 

+ 1 - 1
route/api_user_info.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_user_info(user_name = ''):
+async def api_user_info(user_name = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 

+ 1 - 1
route/api_version.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_version(version_list):
+async def api_version(version_list):
     with get_db_connect() as conn:
         curs = conn.cursor()
 

+ 3 - 3
route/bbs_delete.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_delete(bbs_num = ''):
+async def bbs_delete(bbs_num = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -13,7 +13,7 @@ def bbs_delete(bbs_num = ''):
         
         bbs_num_str = str(bbs_num)
 
-        if acl_check('', 'owner_auth', '', '') == 1:
+        if await acl_check('', 'owner_auth', '', '') == 1:
             return redirect(conn, '/bbs/in/' + bbs_num_str)
         
         if bbs_num_str == 0:
@@ -27,7 +27,7 @@ def bbs_delete(bbs_num = ''):
             return redirect(conn, '/bbs/main')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'bbs_delete'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + bbs_name + ')', 0])],
+                imp = [get_lang(conn, 'bbs_delete'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + bbs_name + ')', 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <span>''' + get_lang(conn, 'delete_warning') + '''</span>

+ 4 - 4
route/bbs_make.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def bbs_make():   
+async def bbs_make():   
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 3)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 3)
         
         if flask.request.method == 'POST':
             curs.execute(db_change('select set_id from bbs_set where set_name = "bbs_name" order by set_id + 0 desc'))
@@ -22,7 +22,7 @@ def bbs_make():
             return redirect(conn, '/bbs/main')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'bbs_make'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'bbs_make'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <input placeholder="''' + get_lang(conn, 'bbs_name') + '''" name="bbs_name">

+ 3 - 3
route/bbs_w.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_w(bbs_num = '', tool = 'bbs', page = 1, name = ''):
+async def bbs_w(bbs_num = '', tool = 'bbs', page = 1, name = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
         
@@ -9,7 +9,7 @@ def bbs_w(bbs_num = '', tool = 'bbs', page = 1, name = ''):
         sub = ''
         bbs_name_dict = {}
 
-        admin_auth = acl_check(tool = 'owner_auth')
+        admin_auth = await acl_check(tool = 'owner_auth')
         admin_auth = 1 if admin_auth == 0 else 0
 
         if tool == 'bbs':
@@ -189,7 +189,7 @@ def bbs_w(bbs_num = '', tool = 'bbs', page = 1, name = ''):
         data += '</table>'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [title_name, wiki_set(conn), wiki_custom(conn), wiki_css([sub, 0])],
+            imp = [title_name, wiki_set(conn), await wiki_custom(conn), wiki_css([sub, 0])],
             data = data,
             menu = menu
         ))

+ 3 - 3
route/bbs_w_comment_tool.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_w_comment_tool(bbs_num = '', post_num = '', comment_num = ''):
+async def bbs_w_comment_tool(bbs_num = '', post_num = '', comment_num = ''):
     with get_db_connect() as conn:
         data = ''
         
@@ -15,7 +15,7 @@ def bbs_w_comment_tool(bbs_num = '', post_num = '', comment_num = ''):
             </ul>
         '''
 
-        if acl_check('', 'owner_auth', '', '') != 1:
+        if await acl_check('', 'owner_auth', '', '') != 1:
             data += '''
                 <h3>''' + get_lang(conn, 'owner') + '''</h2>
                 <ul>
@@ -24,7 +24,7 @@ def bbs_w_comment_tool(bbs_num = '', post_num = '', comment_num = ''):
             '''
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'bbs_comment_tool'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'bbs_comment_tool'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = data,
             menu = [['bbs/w/' + url_pas(bbs_num_str) + '/' + url_pas(post_num_str) + '#' + url_pas(comment_num), get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/bbs_w_delete.py

@@ -16,7 +16,7 @@ async def bbs_w_delete(bbs_num = '', post_num = '', comment_num = ''):
         bbs_num_str = str(bbs_num)
         post_num_str = str(post_num)
 
-        if acl_check('', 'owner_auth', '') == 1:
+        if await acl_check('', 'owner_auth', '') == 1:
             return redirect(conn, '/bbs/in/' + bbs_num_str)
         
         temp_dict = await api_bbs_w(bbs_num_str + '-' + post_num_str)
@@ -54,7 +54,7 @@ async def bbs_w_delete(bbs_num = '', post_num = '', comment_num = ''):
                 sub += ' (' + comment_num + ')'
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css([sub, 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css([sub, 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <span>''' + get_lang(conn, 'delete_warning') + '''</span>

+ 13 - 13
route/bbs_w_edit.py

@@ -21,26 +21,26 @@ async def bbs_w_edit(bbs_num = '', post_num = '', comment_num = ''):
         if comment_num != '':
             temp_dict = await api_bbs_w_comment_one(bbs_num_str + '-' + post_num_str + '-' + comment_num)
             if 'comment_user_id' in temp_dict:
-                if not temp_dict['comment_user_id'] == ip and acl_check('', 'owner_auth', '', '') == 1:
-                    return re_error(conn, 0)
+                if not temp_dict['comment_user_id'] == ip and await acl_check('', 'owner_auth', '', '') == 1:
+                    return await re_error(conn, 0)
             else:
                 return redirect(conn, '/bbs/main')
         elif post_num != '':
             temp_dict = await api_bbs_w(bbs_num_str + '-' + post_num_str)
             if 'user_id' in temp_dict:
-                if not temp_dict['user_id'] == ip and acl_check('', 'owner_auth', '', '') == 1:
-                    return re_error(conn, 0)
+                if not temp_dict['user_id'] == ip and await acl_check('', 'owner_auth', '', '') == 1:
+                    return await re_error(conn, 0)
             else:
                 return redirect(conn, '/bbs/main')
             
-        if acl_check(bbs_num_str, 'bbs_edit') == 1:
+        if await acl_check(bbs_num_str, 'bbs_edit') == 1:
             return redirect(conn, '/bbs/set/' + bbs_num_str)
         
         i_list = ['post_view_acl', 'post_comment_acl']
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
         
             if post_num == '':
                 curs.execute(db_change('select set_code from bbs_data where set_name = "title" and set_id = ? order by set_code + 0 desc'), [bbs_num_str])
@@ -56,11 +56,11 @@ async def bbs_w_edit(bbs_num = '', post_num = '', comment_num = ''):
                 # re_error로 대체 예정
                 return redirect(conn, '/bbs/in/' + bbs_num_str)
             
-            if do_edit_filter(conn, title) == 1:
-                return re_error(conn, 21)
+            if await do_edit_filter(conn, title) == 1:
+                return await re_error(conn, 21)
 
-            if do_edit_filter(conn, data) == 1:
-                return re_error(conn, 21)
+            if await do_edit_filter(conn, data) == 1:
+                return await re_error(conn, 21)
             
             date = get_time()
 
@@ -125,13 +125,13 @@ async def bbs_w_edit(bbs_num = '', post_num = '', comment_num = ''):
                 bbs_title = get_lang(conn, 'post_edit')
     
             return easy_minify(conn, flask.render_template(skin_check(conn), 
-                imp = [bbs_title, wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [bbs_title, wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data =  editor_top_text + '''
                     <form method="post">                        
                         <input style="''' + option_display + '''" placeholder="''' + get_lang(conn, 'title') + '''" name="title" value="''' + html.escape(title) + '''">
                         <hr style="''' + option_display + '''" class="main_hr">
 
-                        ''' + edit_editor(conn, ip, data, 'bbs') + '''
+                        ''' + await edit_editor(conn, ip, data, 'bbs') + '''
 
                         <!--
                         <div style="''' + option_display + '''">

+ 3 - 3
route/bbs_w_hide.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_w_hide(bbs_num = '', post_num = ''):
+async def bbs_w_hide(bbs_num = '', post_num = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -14,14 +14,14 @@ def bbs_w_hide(bbs_num = '', post_num = ''):
         bbs_num_str = str(bbs_num)
         post_num_str = str(post_num)
 
-        if acl_check('', 'bbs_auth', '', '') == 1:
+        if await acl_check('', 'bbs_auth', '', '') == 1:
             return redirect(conn, '/bbs/in/' + bbs_num_str)
         
         if flask.request.method == 'POST':
             pass
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'bbs_post_hide'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + bbs_name + ')' + ' (' + post_num_str + ')', 0])],
+                imp = [get_lang(conn, 'bbs_post_hide'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + bbs_name + ')' + ' (' + post_num_str + ')', 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <button type="submit">''' + get_lang(conn, 'hide') + '''</button>

+ 2 - 2
route/bbs_w_pinned.py

@@ -16,7 +16,7 @@ async def bbs_w_pinned(bbs_num = '', post_num = ''):
         bbs_num_str = str(bbs_num)
         post_num_str = str(post_num)
 
-        if acl_check('', 'bbs_auth', '', '') == 1:
+        if await acl_check('', 'bbs_auth', '', '') == 1:
             return redirect(conn, '/bbs/in/' + bbs_num_str)
         
         temp_dict = await api_bbs_w(bbs_num_str + '-' + post_num_str)
@@ -36,7 +36,7 @@ async def bbs_w_pinned(bbs_num = '', post_num = ''):
             pinned = get_lang(conn, 'pinned') if not curs.fetchall() else get_lang(conn, 'pinned_release')
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'bbs_post_pinned'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + bbs_name + ')' + ' (' + post_num_str + ')', 0])],
+                imp = [get_lang(conn, 'bbs_post_pinned'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + bbs_name + ')' + ' (' + post_num_str + ')', 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <button type="submit">''' + pinned + '''</button>

+ 9 - 9
route/bbs_w_post.py

@@ -66,7 +66,7 @@ async def bbs_w_post(bbs_num = '', post_num = ''):
 
         bbs_num_str = str(bbs_num)
         post_num_str = str(post_num)
-        bbs_comment_acl = acl_check(bbs_num_str, 'bbs_comment')
+        bbs_comment_acl = await acl_check(bbs_num_str, 'bbs_comment')
         ip = ip_check()
 
         temp_dict = await api_bbs_w(bbs_num_str + '-' + post_num_str)
@@ -83,8 +83,8 @@ async def bbs_w_post(bbs_num = '', post_num = ''):
                     if bbs_comment_acl == 1:
                         return redirect(conn, '/bbs/set/' + bbs_num_str)
                     
-                    if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                        return re_error(conn, 13)
+                    if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                        return await re_error(conn, 13)
 
                     set_id = bbs_num_str + '-' + post_num_str
 
@@ -113,8 +113,8 @@ async def bbs_w_post(bbs_num = '', post_num = ''):
                     if bbs_comment_acl == 1:
                         return redirect(conn, '/bbs/set/' + bbs_num_str)
                     
-                    if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                        return re_error(conn, 13)
+                    if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                        return await re_error(conn, 13)
                     
                     select = flask.request.form.get('comment_select', '0')
                     select = '' if select == '0' else select
@@ -171,8 +171,8 @@ async def bbs_w_post(bbs_num = '', post_num = ''):
 
                     return redirect(conn, '/bbs/w/' + bbs_num_str + '/' + post_num_str + '#' + end_id)
             else:
-                if acl_check(bbs_num_str, 'bbs_view') == 1:
-                    return re_error(conn, 0)
+                if await acl_check(bbs_num_str, 'bbs_view') == 1:
+                    return await re_error(conn, 0)
 
                 date = ''
                 date += '<a href="javascript:opennamu_change_comment(\'0\');">(' + get_lang(conn, 'comment') + ')</a> '
@@ -200,7 +200,7 @@ async def bbs_w_post(bbs_num = '', post_num = ''):
                     bbs_comment_form += '''
                         <div id="opennamu_bbs_w_post_tabom"></div>
                         <div id="opennamu_bbs_w_post_select"></div>
-                        ''' + edit_editor(conn, ip, '', 'bbs_comment') + '''
+                        ''' + await edit_editor(conn, ip, '', 'bbs_comment') + '''
                     '''
 
                 data += '''
@@ -210,7 +210,7 @@ async def bbs_w_post(bbs_num = '', post_num = ''):
                 '''
 
                 return easy_minify(conn, flask.render_template(skin_check(conn),
-                    imp = [bbs_name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'bbs') + ')', 0])],
+                    imp = [bbs_name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'bbs') + ')', 0])],
                     data = data,
                     menu = [['bbs/in/' + bbs_num_str, get_lang(conn, 'return')], ['bbs/edit/' + bbs_num_str + '/' + post_num_str, get_lang(conn, 'edit')], ['bbs/tool/' + bbs_num_str + '/' + post_num_str, get_lang(conn, 'tool')]]
                 ))

+ 3 - 3
route/bbs_w_tool.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_w_tool(bbs_num = '', post_num = ''):
+async def bbs_w_tool(bbs_num = '', post_num = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -16,7 +16,7 @@ def bbs_w_tool(bbs_num = '', post_num = ''):
             </ul>
         '''
 
-        if acl_check('', 'bbs_auth', '', '') != 1:
+        if await acl_check('', 'bbs_auth', '', '') != 1:
             curs.execute(db_change('select set_data from bbs_data where set_code = ? and set_id = ? and set_name = "pinned"'), [post_num_str, bbs_num_str])
             pinned = get_lang(conn, 'pinned') if not curs.fetchall() else get_lang(conn, 'pinned_release')
 
@@ -36,7 +36,7 @@ def bbs_w_tool(bbs_num = '', post_num = ''):
             '''
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'bbs_post_tool'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'bbs_post_tool'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = data,
             menu = [['bbs/w/' + url_pas(bbs_num_str) + '/' + url_pas(post_num_str), get_lang(conn, 'return')]]
         ))

+ 22 - 22
route/edit.py

@@ -25,7 +25,7 @@ def edit_timeout(func, args = (), timeout = 3):
         pool.join()
         return 0
         
-def edit_editor(conn, ip, data_main = '', do_type = 'edit', addon = '', name = ''):
+async def edit_editor(conn, ip, data_main = '', do_type = 'edit', addon = '', name = ''):
     curs = conn.cursor()
 
     monaco_editor_top = ''
@@ -82,7 +82,7 @@ def edit_editor(conn, ip, data_main = '', do_type = 'edit', addon = '', name = '
 
     textarea_size = 'opennamu_textarea_500' if do_type == 'edit' else 'opennamu_textarea_100'
 
-    out_field = captcha_get(conn) + ip_warning(conn) + addon
+    out_field = await captcha_get(conn) + ip_warning(conn) + addon
     if out_field != '':
         out_field += '<hr class="main_hr">'
 
@@ -118,27 +118,27 @@ def edit_editor(conn, ip, data_main = '', do_type = 'edit', addon = '', name = '
         <div id="opennamu_preview_area"></div>
     '''
 
-def edit(name = 'Test', section = 0, do_type = ''):
+async def edit(name = 'Test', section = 0, do_type = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
     
         ip = ip_check()
 
         edit_req_mode = 0
-        if acl_check(name, 'document_edit') == 1:
+        if await acl_check(name, 'document_edit') == 1:
             edit_req_mode = 1
-            if acl_check(name, 'document_edit_request') == 1:
+            if await acl_check(name, 'document_edit_request') == 1:
                 return redirect(conn, '/raw_acl/' + url_pas(name))
             
         if do_title_length_check(conn, name) == 1:
-            return re_error(conn, 38)
+            return await re_error(conn, 38)
         
         curs.execute(db_change("select id from history where title = ? order by id + 0 desc"), [name])
         doc_ver = curs.fetchall()
         doc_ver = doc_ver[0][0] if doc_ver else '0'
 
         if doc_ver == '0':
-            if acl_check(name, 'document_make_acl') == 1:
+            if await acl_check(name, 'document_make_acl') == 1:
                 edit_req_mode = 1
 
         curs.execute(db_change("select set_data from data_set where doc_name = ? and doc_rev = ? and set_name = 'edit_request_data'"), [name, doc_ver])
@@ -153,28 +153,28 @@ def edit(name = 'Test', section = 0, do_type = ''):
             edit_repeat = 'get'
         
         if edit_repeat == 'post':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
     
-            if do_edit_slow_check(conn) == 1:
-                return re_error(conn, 24)
+            if await do_edit_slow_check(conn) == 1:
+                return await re_error(conn, 24)
     
             today = get_time()
             content = flask.request.form.get('content', '').replace('\r', '')
             send = flask.request.form.get('send', '')
             agree = flask.request.form.get('copyright_agreement', '')
             
-            if do_edit_filter(conn, content) == 1:
-                return re_error(conn, 21)
+            if await do_edit_filter(conn, content) == 1:
+                return await re_error(conn, 21)
             
-            if do_edit_filter(conn, send) == 1:
-                return re_error(conn, 21)
+            if await do_edit_filter(conn, send) == 1:
+                return await re_error(conn, 21)
 
-            if do_edit_send_check(conn, send) == 1:
-                return re_error(conn, 37)
+            if await do_edit_send_check(conn, send) == 1:
+                return await re_error(conn, 37)
 
             if do_edit_text_bottom_check_box_check(conn, agree) == 1:
-                return re_error(conn, 29)
+                return await re_error(conn, 29)
             
             curs.execute(db_change("select data from data where title = ?"), [name])
             db_data = curs.fetchall()
@@ -208,7 +208,7 @@ def edit(name = 'Test', section = 0, do_type = ''):
             db_data_3 = curs.fetchall()
             if db_data_3 and db_data_3[0][0] != '':
                 if int(number_check(db_data_3[0][0])) < len(content):
-                    return re_error(conn, 44)
+                    return await re_error(conn, 44)
 
             curs.execute(db_change("select data from other where name = 'edit_timeout'"))
             db_data_2 = curs.fetchall()
@@ -219,7 +219,7 @@ def edit(name = 'Test', section = 0, do_type = ''):
                 timeout = 0
 
             if timeout == 1:
-                return re_error(conn, 41)
+                return await re_error(conn, 41)
             
             if edit_req_mode == 0:
                 # 진짜 기록 부분
@@ -361,7 +361,7 @@ def edit(name = 'Test', section = 0, do_type = ''):
             sub_title = '(' + get_lang(conn, 'edit_request') + ')' if edit_req_mode == 1 else '(' + get_lang(conn, 'edit') + ')'
 
             return easy_minify(conn, flask.render_template(skin_check(conn), 
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css([sub_title + sub_menu, 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css([sub_title + sub_menu, 0])],
                 data = editor_top_text + '''
                     <form method="post">
                         <textarea style="display: none;" name="doc_section_data_where">''' + data_section_where + '''</textarea>
@@ -373,7 +373,7 @@ def edit(name = 'Test', section = 0, do_type = ''):
                         <input placeholder="''' + get_lang(conn, 'why') + '''" name="send">
                         <hr class="main_hr">
                         
-                        ''' + edit_editor(conn, ip, data_section, addon = get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'edit') , name = name) + '''
+                        ''' + await edit_editor(conn, ip, data_section, addon = get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'edit') , name = name) + '''
                     </form>
                 ''',
                 menu = [

+ 1 - 1
route/edit_backlink_reset.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def edit_backlink_reset(name = 'Test'):
+async def edit_backlink_reset(name = 'Test'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 

+ 12 - 12
route/edit_delete.py

@@ -1,32 +1,32 @@
 from .tool.func import *
 
-def edit_delete(name):
+async def edit_delete(name):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         ip = ip_check()
-        if acl_check(name, 'document_delete') == 1:
-            return re_error(conn, 0)
+        if await acl_check(name, 'document_delete') == 1:
+            return await re_error(conn, 0)
 
         curs.execute(db_change("select title from data where title = ?"), [name])
         if not curs.fetchall():
             return redirect(conn, '/w/' + url_pas(name))
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
-            if do_edit_slow_check(conn) == 1:
-                return re_error(conn, 24)
+            if await do_edit_slow_check(conn) == 1:
+                return await re_error(conn, 24)
             
             send = flask.request.form.get('send', '')
             agree = flask.request.form.get('copyright_agreement', '')
             
-            if do_edit_send_check(conn, send) == 1:
-                return re_error(conn, 37)
+            if await do_edit_send_check(conn, send) == 1:
+                return await re_error(conn, 37)
             
             if do_edit_text_bottom_check_box_check(conn, agree) == 1:
-                return re_error(conn, 29)
+                return await re_error(conn, 29)
 
             curs.execute(db_change("select data from data where title = ?"), [name])
             data = curs.fetchall()
@@ -54,12 +54,12 @@ def edit_delete(name):
             return redirect(conn, '/w/' + url_pas(name))
         else:            
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'delete') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'delete') + ')', 0])],
                 data = '''
                     <form method="post">
                         <input placeholder="''' + get_lang(conn, 'why') + '''" name="send">
                         <hr class="main_hr">
-                        ''' + captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'delete')  + '''
+                        ''' + await captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'delete')  + '''
                         <button type="submit">''' + get_lang(conn, 'delete') + '''</button>
                     </form>
                 ''',

+ 6 - 6
route/edit_delete_file.py

@@ -2,10 +2,10 @@ from .tool.func import *
 
 from .edit_delete import edit_delete
 
-def edit_delete_file(name = 'test.jpg'):
+async def edit_delete_file(name = 'test.jpg'):
     with get_db_connect() as conn:
-        if acl_check('', 'owner_auth', '', '') != 0:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') != 0:
+            return await re_error(conn, 0)
 
         mime_type = re.search(r'([^.]+)$', name)
         mime_type_str = 'jpg'
@@ -22,16 +22,16 @@ def edit_delete_file(name = 'test.jpg'):
             return redirect(conn, '/w/' + url_pas(name))
 
         if flask.request.method == 'POST':
-            acl_check(tool = 'owner_auth', memo = 'file del (' + name + ')')
+            await acl_check(tool = 'owner_auth', memo = 'file del (' + name + ')')
             os.remove(file_directory)
 
             if flask.request.form.get('with_doc', '') != '':
-                edit_delete(name)
+                await edit_delete(name)
 
             return redirect(conn, '/w/' + url_pas(name))
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'file_delete') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'file_delete') + ')', 0])],
                 data = '''
                     <form method="post">
                         <img src="/image/''' + url_pas(file_all_name) + '''">

+ 9 - 9
route/edit_delete_multiple.py

@@ -2,36 +2,36 @@ from .tool.func import *
 
 from .edit_delete import edit_delete
 
-def edit_delete_multiple():
+async def edit_delete_multiple():
     with get_db_connect() as conn:
-        if acl_check('', 'acl_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'acl_auth', '', '') == 1:
+            return await re_error(conn, 0)
 
         if flask.request.method == 'POST':
             send = flask.request.form.get('send', '')
             agree = flask.request.form.get('copyright_agreement', '')
             
-            if do_edit_send_check(conn, send) == 1:
-                return re_error(conn, 37)
+            if await do_edit_send_check(conn, send) == 1:
+                return await re_error(conn, 37)
             
             if do_edit_text_bottom_check_box_check(conn, agree) == 1:
-                return re_error(conn, 29)
+                return await re_error(conn, 29)
             
             all_title = re.findall(r'([^\n]+)\n', flask.request.form.get('content', '').replace('\r', '') + '\n')
             for name in all_title:
-                edit_delete(name)
+                await edit_delete(name)
 
             return redirect(conn, '/recent_change')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'many_delete'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'many_delete'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <textarea class="opennamu_textarea_500" placeholder="''' + get_lang(conn, 'many_delete_help') + '''" name="content"></textarea>
                         <hr class="main_hr">
                         <input placeholder="''' + get_lang(conn, 'why') + '''" name="send" type="text">
                         <hr class="main_hr">
-                        ''' + captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'edit')  + '''
+                        ''' + await captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'edit')  + '''
                         <button type="submit">''' + get_lang(conn, 'delete') + '''</button>
                     </form>
                 ''',

+ 19 - 19
route/edit_move.py

@@ -1,25 +1,25 @@
 from .tool.func import *
 
-def edit_move(name):
+async def edit_move(name):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check(name, 'document_move') == 1:
-            return re_error(conn, 0)
+        if await acl_check(name, 'document_move') == 1:
+            return await re_error(conn, 0)
         
         if do_title_length_check(conn, name) == 1:
-            return re_error(conn, 38)
+            return await re_error(conn, 38)
 
         if flask.request.method == 'POST':
             move_title = flask.request.form.get('title', 'test')
-            if acl_check(move_title) == 1:
-                return re_error(conn, 0)
+            if await acl_check(move_title) == 1:
+                return await re_error(conn, 0)
 
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
-            if do_edit_slow_check(conn) == 1:
-                return re_error(conn, 24)
+            if await do_edit_slow_check(conn) == 1:
+                return await re_error(conn, 24)
             
             send = flask.request.form.get('send', '')
             agree = flask.request.form.get('copyright_agreement', '')
@@ -33,18 +33,18 @@ def edit_move(name):
             move_option_topic = flask.request.form.get('move_topic_option', 'none')
             document_set_option = flask.request.form.get('document_set_option', 'none')
             
-            if do_edit_send_check(conn, send) == 1:
-                return re_error(conn, 37)
+            if await do_edit_send_check(conn, send) == 1:
+                return await re_error(conn, 37)
             
             if do_edit_text_bottom_check_box_check(conn, agree) == 1:
-                return re_error(conn, 29)
+                return await re_error(conn, 29)
 
             # 역링크 관련 패치 해야할 듯
 
             # 문서 이동 파트 S
             curs.execute(db_change("select title from history where title = ?"), [move_title])
             if curs.fetchall():
-                if move_option == 'merge' and acl_check(tool = 'owner_auth', memo = 'merge documents (' + name + ') (' + move_title + ')') != 1:
+                if move_option == 'merge' and await acl_check(tool = 'owner_auth', memo = 'merge documents (' + name + ') (' + move_title + ')') != 1:
                     curs.execute(db_change("select data from data where title = ?"), [move_title])
                     data = curs.fetchall()
                     if data:
@@ -160,7 +160,7 @@ def edit_move(name):
             # 토론 이동 파트 S
             curs.execute(db_change("select title from rd where title = ?"), [move_title])
             if curs.fetchall():
-                if move_option_topic == 'merge' and acl_check(tool = 'owner_auth', memo = 'merge document\'s topics (' + name + ') (' + move_title + ')') != 1:
+                if move_option_topic == 'merge' and await acl_check(tool = 'owner_auth', memo = 'merge document\'s topics (' + name + ') (' + move_title + ')') != 1:
                     curs.execute(db_change("update rd set title = ? where title = ?"), [move_title, name])
                 elif move_option_topic == 'reverse':
                     i = 0
@@ -208,13 +208,13 @@ def edit_move(name):
             if has_error == 0:
                 return redirect(conn, '/w/' + url_pas(move_title))
             else:
-                return re_error(conn, 19)
+                return await re_error(conn, 19)
         else:
-            owner_auth = acl_check(tool = 'owner_auth')
+            owner_auth = await acl_check(tool = 'owner_auth')
             owner_auth = 1 if owner_auth == 0 else 0
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'move') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'move') + ')', 0])],
                 data = '''
                     <form method="post">
                         <span>''' + get_lang(conn, 'document_name') + '''</span>
@@ -256,7 +256,7 @@ def edit_move(name):
                             '''
                         ) if owner_auth == 1 else '') + '''
 
-                        ''' + captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'move')  + '''
+                        ''' + await captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'move')  + '''
                         
                         <button type="submit">''' + get_lang(conn, 'move') + '''</button>
                     </form>

+ 4 - 4
route/edit_request.py

@@ -2,12 +2,12 @@ from .tool.func import *
 
 from .view_diff import view_diff_do
 
-def edit_request(name = 'Test', do_type = ''):
+async def edit_request(name = 'Test', do_type = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         disabled = ""
-        if acl_check(name, 'document_edit') == 1:
+        if await acl_check(name, 'document_edit') == 1:
             disabled = "disabled"
 
         curs.execute(db_change("select id from history where title = ? order by id + 0 desc"), [name])
@@ -15,7 +15,7 @@ def edit_request(name = 'Test', do_type = ''):
         doc_ver = doc_ver[0][0] if doc_ver else '0'
 
         if doc_ver == '0':
-            if acl_check(name, 'document_make_acl') == 1:
+            if await acl_check(name, 'document_make_acl') == 1:
                 disabled = "disabled"
 
         curs.execute(db_change("select set_data from data_set where doc_name = ? and doc_rev = ? and set_name = 'edit_request_data'"), [name, doc_ver])
@@ -91,7 +91,7 @@ def edit_request(name = 'Test', do_type = ''):
             result = view_diff_do(old_data, edit_request_data, 'r' + doc_ver, get_lang(conn, 'edit_request'))
 
             return easy_minify(conn, flask.render_template(skin_check(conn), 
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'edit_request_check') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'edit_request_check') + ')', 0])],
                 data = '''
                     <div id="opennamu_get_user_info">''' + html.escape(edit_request_user) + '''</div>
                     <hr class="main_hr">

+ 17 - 17
route/edit_revert.py

@@ -1,15 +1,15 @@
 from .tool.func import *
 
-def edit_revert(name, num):
+async def edit_revert(name, num):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         curs.execute(db_change("select title from history where title = ? and id = ? and hide = 'O'"), [name, str(num)])
-        if curs.fetchall() and acl_check(tool = 'hidel_auth') == 1:
-            return re_error(conn, 3)
+        if curs.fetchall() and await acl_check(tool = 'hidel_auth') == 1:
+            return await re_error(conn, 3)
 
-        if acl_check(name, 'document_edit') == 1:
-            return re_error(conn, 0)
+        if await acl_check(name, 'document_edit') == 1:
+            return await re_error(conn, 0)
         
         curs.execute(db_change("select data from history where title = ? and id = ?"), [name, str(num)])
         data = curs.fetchall()
@@ -17,29 +17,29 @@ def edit_revert(name, num):
             return redirect(conn, '/w/' + url_pas(name))
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
-            if do_edit_slow_check(conn) == 1:
-                return re_error(conn, 24)
+            if await do_edit_slow_check(conn) == 1:
+                return await re_error(conn, 24)
             
             send = flask.request.form.get('send', '')
             agree = flask.request.form.get('copyright_agreement', '')
             
-            if do_edit_send_check(conn, send) == 1:
-                return re_error(conn, 37)
+            if await do_edit_send_check(conn, send) == 1:
+                return await re_error(conn, 37)
             
             if do_edit_text_bottom_check_box_check(conn, agree) == 1:
-                return re_error(conn, 29)
+                return await re_error(conn, 29)
 
-            if do_edit_filter(conn, data[0][0]) == 1:
-                return re_error(conn, 21)
+            if await do_edit_filter(conn, data[0][0]) == 1:
+                return await re_error(conn, 21)
             
             curs.execute(db_change("select data from other where name = 'document_content_max_length'"))
             db_data = curs.fetchall()
             if db_data and db_data[0][0] != '':
                 if int(number_check(db_data[0][0])) < len(data[0][0]):
-                    return re_error(conn, 44)
+                    return await re_error(conn, 44)
 
             curs.execute(db_change("select data from data where title = ?"), [name])
             data_old = curs.fetchall()
@@ -75,12 +75,12 @@ def edit_revert(name, num):
                 preview = ''
             
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(r' + str(num) + ') (' + get_lang(conn, 'revert') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(r' + str(num) + ') (' + get_lang(conn, 'revert') + ')', 0])],
                 data = '''
                     <form method="post">
                         <input placeholder="''' + get_lang(conn, 'why') + '''" name="send" type="text">
                         <hr class="main_hr">
-                        ''' + captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'revert')  + '''
+                        ''' + await captcha_get(conn) + ip_warning(conn) + get_edit_text_bottom_check_box(conn) + get_edit_text_bottom(conn, 'revert')  + '''
                         <button type="submit">''' + get_lang(conn, 'revert') + '''</button>
                     </form>
                 ''' + preview,

+ 15 - 15
route/edit_upload.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def edit_upload():
+async def edit_upload():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'upload') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'upload') == 1:
+            return await re_error(conn, 0)
         
         curs.execute(db_change('select data from other where name = "upload"'))
         db_data = curs.fetchall()
@@ -13,8 +13,8 @@ def edit_upload():
         file_max = int(file_max)
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
             file_data = flask.request.files.getlist("f_data[]")
             file_len = len(file_data)
@@ -24,20 +24,20 @@ def edit_upload():
                 file_size_all = 0
 
             if (file_max * 1000 * 1000 * file_len) < file_size_all or file_size_all == 0:
-                return re_error(conn, 17)
+                return await re_error(conn, 17)
 
             if file_len == 1:
                 file_num = None
             else:
-                if acl_check('', 'many_upload') == 1:
-                    return re_error(conn, 0)
+                if await acl_check('', 'many_upload') == 1:
+                    return await re_error(conn, 0)
 
                 file_num = 1
 
             for data in file_data:
                 file_name = data.filename if data.filename else ''
                 if file_name == '':
-                    return re_error(conn, 9)
+                    return await re_error(conn, 9)
                 
                 value_tmp = os.path.splitext(file_name)
                 value = ''
@@ -47,7 +47,7 @@ def edit_upload():
                 curs.execute(db_change("select html from html_filter where kind = 'extension'"))
                 extension = [i[0].lower() for i in curs.fetchall()]
                 if not re.sub(r'^\.', '', value).lower() in extension:
-                    return re_error(conn, 14)
+                    return await re_error(conn, 14)
 
                 name = ''
                 if flask.request.form.get('f_name', None):
@@ -57,13 +57,13 @@ def edit_upload():
 
                 piece = os.path.splitext(name)
                 if re.search(r'\.', piece[0]):
-                    return re_error(conn, 22)
+                    return await re_error(conn, 22)
 
                 e_data = sha224_replace(piece[0]) + piece[1]
 
                 curs.execute(db_change("select title from data where title = ?"), ['file:' + name])
                 if curs.fetchall():
-                    return re_error(conn, 16)
+                    return await re_error(conn, 16)
 
                 curs.execute(db_change("select html from html_filter where kind = 'file'"))
                 db_data = curs.fetchall()
@@ -74,7 +74,7 @@ def edit_upload():
 
                 data_url_image = load_image_url(conn)
                 if os.path.exists(os.path.join(data_url_image, e_data)):
-                    return re_error(conn, 16)
+                    return await re_error(conn, 16)
                 else:
                     data.save(os.path.join(data_url_image, e_data))
 
@@ -136,7 +136,7 @@ def edit_upload():
             upload_default = html.escape(db_data[0][0]) if db_data and db_data[0][0] != '' else ''
             
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'upload'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'upload'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <a href="/filter/file_filter">(''' + get_lang(conn, 'file_filter_list') + ''')</a> <a href="/filter/extension_filter">(''' + get_lang(conn, 'extension_filter_list') + ''')</a>
                     ''' + upload_help + '''
@@ -154,7 +154,7 @@ def edit_upload():
                         <hr class="main_hr">
                         <textarea class="opennamu_textarea_100" placeholder="''' + get_lang(conn, 'other') + '''" name="f_lice">''' + upload_default + '''</textarea>
                         <hr class="main_hr">
-                        ''' + captcha_get(conn) + '''
+                        ''' + await captcha_get(conn) + '''
                         <button id="opennamu_save_button" type="submit">''' + get_lang(conn, 'save') + '''</button>
                     </form>
                 ''',

+ 5 - 5
route/filter_all.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def filter_all(tool):
+async def filter_all(tool):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -13,12 +13,12 @@ def filter_all(tool):
 
         div += '</tr>'
 
-        admin = acl_check(tool = 'owner_auth')
+        admin = await acl_check(tool = 'owner_auth')
         admin = 1 if admin == 0 else 0
 
         if tool == 'edit_filter':
-            if acl_check('', 'edit_filter_view', '', '') == 1:
-                return re_error(conn, 0)
+            if await acl_check('', 'edit_filter_view', '', '') == 1:
+                return await re_error(conn, 0)
 
         if tool == 'inter_wiki':
             title = get_lang(conn, 'interwiki_list')
@@ -88,7 +88,7 @@ def filter_all(tool):
             div += '<a href="/filter/' + tool + '/add">(' + get_lang(conn, 'add') + ')</a>'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [title, wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [title, wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = div,
             menu = [['manager/1', get_lang(conn, 'return')]]
         ))

+ 18 - 18
route/filter_all_add.py

@@ -8,8 +8,8 @@ async def filter_all_add(tool, name = None):
             return redirect(conn, '/manager/9')
 
         if flask.request.method == 'POST':
-            if acl_check('', 'owner_auth', '', '') == 1:
-                return re_error(conn, 3)
+            if await acl_check('', 'owner_auth', '', '') == 1:
+                return await re_error(conn, 3)
 
             title = flask.request.form.get('title', 'test')
             if tool in ('inter_wiki', 'outer_link'):
@@ -23,7 +23,7 @@ async def filter_all_add(tool, name = None):
                     curs.execute(db_change("delete from html_filter where html = ? and kind = 'inter_wiki_sub'"), [title])
                     curs.execute(db_change('insert into html_filter (html, plus, plus_t, kind) values (?, "inter_wiki_type", ?, "inter_wiki_sub")'), [title, inter_type])
                 
-                acl_check(tool = 'owner_auth', memo = tool + ' edit')
+                await acl_check(tool = 'owner_auth', memo = tool + ' edit')
             elif tool == 'edit_filter':
                 day = flask.request.form.get('day', '0')
                 end = 'X' if day == '0' else day
@@ -35,11 +35,11 @@ async def filter_all_add(tool, name = None):
                 try:
                     re.compile(content)
                 except:
-                    return re_error(conn, 23)
+                    return await re_error(conn, 23)
                 
                 curs.execute(db_change("delete from html_filter where html = ? and kind = 'regex_filter'"), [name])
                 curs.execute(db_change("insert into html_filter (html, plus, plus_t, kind) values (?, ?, ?, 'regex_filter')"), [name, content, end])
-                acl_check(tool = 'owner_auth', memo = 'edit_filter edit')
+                await acl_check(tool = 'owner_auth', memo = 'edit_filter edit')
             elif tool == 'document':
                 post_name = flask.request.form.get('name', '')
                 if post_name == '':
@@ -50,46 +50,46 @@ async def filter_all_add(tool, name = None):
                 try:
                     re.compile(post_regex)
                 except:
-                    return re_error(conn, 23)
+                    return await re_error(conn, 23)
                 
                 curs.execute(db_change('insert into html_filter (html, kind, plus, plus_t) values (?, "document", ?, ?)'), [post_name, post_regex, post_acl])
-                acl_check(tool = 'owner_auth', memo = 'document_filter edit')
+                await acl_check(tool = 'owner_auth', memo = 'document_filter edit')
             else:
                 plus_d = ''
                 if tool == 'name_filter':
                     try:
                         re.compile(title)
                     except:
-                        return re_error(conn, 23)
+                        return await re_error(conn, 23)
 
-                    acl_check(tool = 'owner_auth', memo = 'name_filter edit')
+                    await acl_check(tool = 'owner_auth', memo = 'name_filter edit')
                     type_d = 'name'
                 elif tool == 'file_filter':
                     try:
                         re.compile(title)
                     except:
-                        return re_error(conn, 23)
+                        return await re_error(conn, 23)
 
-                    acl_check(tool = 'owner_auth', memo = 'file_filter edit')
+                    await acl_check(tool = 'owner_auth', memo = 'file_filter edit')
                     type_d = 'file'
                 elif tool == 'email_filter':
-                    acl_check(tool = 'owner_auth', memo = 'email_filter edit')
+                    await acl_check(tool = 'owner_auth', memo = 'email_filter edit')
                     type_d = 'email'
                 elif tool == 'image_license':
-                    acl_check(tool = 'owner_auth', memo = 'image_license edit')
+                    await acl_check(tool = 'owner_auth', memo = 'image_license edit')
                     type_d = 'image_license'
                 elif tool == 'extension_filter':
-                    acl_check(tool = 'owner_auth', memo = 'extension_filter edit')
+                    await acl_check(tool = 'owner_auth', memo = 'extension_filter edit')
                     type_d = 'extension'
                     plus_d = flask.request.form.get('max_file_size', '')
                     if plus_d != '':
                         plus_d = number_check(plus_d)
                 elif tool == 'template':
-                    acl_check(tool = 'owner_auth', memo = 'template_document edit')
+                    await acl_check(tool = 'owner_auth', memo = 'template_document edit')
                     type_d = 'template'
                     plus_d = flask.request.form.get('exp', 'test')
                 else:
-                    acl_check(tool = 'owner_auth', memo = 'edit_top edit')
+                    await acl_check(tool = 'owner_auth', memo = 'edit_top edit')
                     type_d = 'edit_top'
                     plus_d = flask.request.form.get('markup', 'test')
 
@@ -101,7 +101,7 @@ async def filter_all_add(tool, name = None):
             return redirect(conn, '/filter/' + tool)
         else:
             get_sub = 0
-            stat = 'disabled' if acl_check('', 'owner_auth', '', '') == 1 else ''
+            stat = 'disabled' if await acl_check('', 'owner_auth', '', '') == 1 else ''
             name = name if name else ''
 
             if tool in ('inter_wiki', 'outer_link'):
@@ -269,7 +269,7 @@ async def filter_all_add(tool, name = None):
                 '''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [title, wiki_set(conn), wiki_custom(conn), wiki_css([get_sub, 0])],
+                imp = [title, wiki_set(conn), await wiki_custom(conn), wiki_css([get_sub, 0])],
                 data =  '''
                         <form method="post">
                             ''' + form_data + '''

+ 3 - 3
route/filter_all_delete.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def filter_all_delete(tool, name = 'Test'):
+async def filter_all_delete(tool, name = 'Test'):
     with get_db_connect() as conn:
         curs = conn.cursor()
         
-        if acl_check(tool = 'owner_auth', memo = 'del_' + tool) == 1:
-            return re_error(conn, 3)
+        if await acl_check(tool = 'owner_auth', memo = 'del_' + tool) == 1:
+            return await re_error(conn, 3)
 
         if tool == 'inter_wiki':
             curs.execute(db_change("delete from html_filter where html = ? and kind = 'inter_wiki'"), [name])

+ 6 - 6
route/give_admin_groups.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def give_admin_groups(name = 'test'):
+async def give_admin_groups(name = 'test'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -69,11 +69,11 @@ def give_admin_groups(name = 'test'):
         ]
 
         if html.escape(name) != name:
-            return re_error(conn, 48)
+            return await re_error(conn, 48)
 
         if flask.request.method == 'POST':
-            if acl_check(tool = 'owner_auth', memo = 'auth list add (' + name + ')') == 1:
-                return re_error(conn, 3)
+            if await acl_check(tool = 'owner_auth', memo = 'auth list add (' + name + ')') == 1:
+                return await re_error(conn, 3)
 
             curs.execute(db_change("delete from alist where name = ?"), [name])
             for for_a in acl_name_list:
@@ -84,7 +84,7 @@ def give_admin_groups(name = 'test'):
 
             return redirect(conn, '/auth/list/add/' + url_pas(name))
         else:
-            state = 'disabled' if acl_check('', 'owner_auth', '', '') == 1 else ''
+            state = 'disabled' if await acl_check('', 'owner_auth', '', '') == 1 else ''
 
             curs.execute(db_change('select acl from alist where name = ?'), [name])
             acl_list = curs.fetchall()
@@ -109,7 +109,7 @@ def give_admin_groups(name = 'test'):
             data += '</ul>'
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'admin_group') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'admin_group') + ')', 0])],
                 data = '''
                     <form method="post">
                         ''' + data + '''

+ 6 - 6
route/give_delete_admin_group.py

@@ -1,28 +1,28 @@
 from .tool.func import *
 
-def give_delete_admin_group_2(name = 'test'):
+async def give_delete_admin_group_2(name = 'test'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         if name in get_default_admin_group():
             return redirect(conn, '/auth/list')
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 3)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 3)
 
         if flask.request.method == 'POST':
             curs.execute(db_change("select name from user_set where name = 'acl' and data = ? limit 1"), [name])
             if not curs.fetchall():
-                acl_check(tool = 'owner_auth', memo = 'auth list delete (' + name + ')')
+                await acl_check(tool = 'owner_auth', memo = 'auth list delete (' + name + ')')
 
                 curs.execute(db_change("delete from alist where name = ?"), [name])
 
                 return redirect(conn, '/auth/list')
             else:
-                return re_error(conn, 47)
+                return await re_error(conn, 47)
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, "delete_admin_group"), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + name + ')', 0])],
+                imp = [get_lang(conn, "delete_admin_group"), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + name + ')', 0])],
                 data = '' + \
                     '<form method="post">' + \
                         '<button type="submit">' + get_lang(conn, 'delete') + '</button>' + \

+ 15 - 15
route/give_user_ban.py

@@ -1,17 +1,17 @@
 from .tool.func import *
 
-def give_user_ban(name = None, ban_type = ''):
+async def give_user_ban(name = None, ban_type = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         ip = ip_check()
         
         if ban_check(ip = ip, tool = 'login')[0] == 1:
-            if ip_or_user(ip) == 1 or acl_check(tool = 'all_admin_auth', ip = ip) != 0:
-                return re_error(conn, 0)
+            if ip_or_user(ip) == 1 or await acl_check(tool = 'all_admin_auth', ip = ip) != 0:
+                return await re_error(conn, 0)
         else:
-            if acl_check(tool = 'ban_auth', ip = ip) == 1:
-                return re_error(conn, 3)
+            if await acl_check(tool = 'ban_auth', ip = ip) == 1:
+                return await re_error(conn, 3)
 
         if flask.request.method == 'POST':
             end = '0'
@@ -63,7 +63,7 @@ def give_user_ban(name = None, ban_type = ''):
                     try:
                         re.compile(name)
                     except:
-                        return re_error(conn, 23)
+                        return await re_error(conn, 23)
                 elif regex_get == 'cidr':
                     type_d = 'cidr'
 
@@ -73,22 +73,22 @@ def give_user_ban(name = None, ban_type = ''):
                         try:
                             ipaddress.IPv6Network(name, False)
                         except:
-                            return re_error(conn, 45)
+                            return await re_error(conn, 45)
                 elif regex_get == 'private':
                     type_d = 'private'
 
-                    if acl_check(tool = 'owner_auth', ip = ip) == 1:
-                        return re_error(conn, 0)
+                    if await acl_check(tool = 'owner_auth', ip = ip) == 1:
+                        return await re_error(conn, 0)
                 else:
                     type_d = None
 
                 if regex_get != 'private':
                     if name == ip:
-                        if acl_check(tool = 'all_admin_auth', memo = 'ban (' + name + ')') == 1:
-                            return re_error(conn, 3)
+                        if await acl_check(tool = 'all_admin_auth', memo = 'ban (' + name + ')') == 1:
+                            return await re_error(conn, 3)
                     else:
-                        if acl_check(tool = 'ban_auth', memo = 'ban (' + name + ')') == 1:
-                            return re_error(conn, 3)
+                        if await acl_check(tool = 'ban_auth', memo = 'ban (' + name + ')') == 1:
+                            return await re_error(conn, 3)
 
                 ban_insert(conn, 
                     name,
@@ -128,11 +128,11 @@ def give_user_ban(name = None, ban_type = ''):
                     info_data = '<div id="opennamu_get_user_info">' + html.escape(name) + '</div>'
 
             owner_option = ''
-            if acl_check(tool = 'owner_auth', ip = ip) != 1:
+            if await acl_check(tool = 'owner_auth', ip = ip) != 1:
                 owner_option = '<option value="private" ' + ('selected' if ban_type == 'private' else '') + '>' + get_lang(conn, 'private') + '</option>'
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [main_name, wiki_set(conn), wiki_custom(conn), wiki_css([now, 0])],
+                imp = [main_name, wiki_set(conn), await wiki_custom(conn), wiki_css([now, 0])],
                 data = info_data + '''
                     <form method="post" ''' + action + '''>
                         <h2>''' + get_lang(conn, 'method') + '''</h2>

+ 8 - 8
route/give_user_fix.py

@@ -1,20 +1,20 @@
 from .tool.func import *
 
-def give_user_fix(user_name = ''):
+async def give_user_fix(user_name = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         curs.execute(db_change("select data from user_set where id = ? and name = 'pw'"), [user_name])
         if not curs.fetchall():
-            return re_error(conn, 2)
+            return await re_error(conn, 2)
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 3)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 3)
 
         if flask.request.method == 'POST':
             select = flask.request.form.get('select', '')
 
-            acl_check(tool = 'owner_auth', memo = 'user_fix (' + user_name + ') (' + select + ')')
+            await acl_check(tool = 'owner_auth', memo = 'user_fix (' + user_name + ') (' + select + ')')
             if select == 'password_change':
                 password = flask.request.form.get('new_password', '')
                 check_password = flask.request.form.get('password_check', '')
@@ -26,7 +26,7 @@ def give_user_fix(user_name = ''):
                         user_name
                     ])
                 else:
-                    return re_error(conn, 20)
+                    return await re_error(conn, 20)
             elif select == '2fa_password_change':
                 password = flask.request.form.get('new_password', '')
                 check_password = flask.request.form.get('password_check', '')
@@ -39,7 +39,7 @@ def give_user_fix(user_name = ''):
                     else:
                         curs.execute(db_change("insert into user_set (name, id, data) values ('2fa_pw', ?, ?)"), [user_name, hashed])
                 else:
-                    return re_error(conn, 20)
+                    return await re_error(conn, 20)
             elif select == '2fa_off':
                 curs.execute(db_change('select data from user_set where name = "2fa" and id = ?'), [user_name])
                 if curs.fetchall():
@@ -48,7 +48,7 @@ def give_user_fix(user_name = ''):
             return redirect(conn, '/user/' + url_pas(user_name))
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'user_fix'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'user_fix'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <div id="opennamu_get_user_info">''' + html.escape(user_name) + '''</div>

+ 1 - 1
route/go_api_topic.py

@@ -124,7 +124,7 @@ async def api_topic(topic_num = 1, tool = 'normal', s_num = '', e_num = ''):
     with get_db_connect() as conn:
         topic_num = str(topic_num)
 
-        if acl_check('', 'topic_view', topic_num) != 1:
+        if await acl_check('', 'topic_view', topic_num) != 1:
             other_set = {}
             other_set["topic_num"] = topic_num
             other_set["tool"] = tool

+ 1 - 1
route/go_main_func_easter_egg.py

@@ -28,7 +28,7 @@ def main_func_easter_egg():
             data = ''
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = ['Easter Egg', wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = ['Easter Egg', wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = data,
             menu = 0
         ))

+ 2 - 2
route/list_acl.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_acl(arg_num = 1):
+async def list_acl(arg_num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -33,7 +33,7 @@ def list_acl(arg_num = 1):
         div += next_fix(conn, '/list/document/acl/', arg_num, list_data)
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'acl_document_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'acl_document_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = div,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_admin.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_admin():
+async def list_admin():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -20,7 +20,7 @@ def list_admin():
         div += '</ul>'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'admin_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'admin_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = div,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 3 - 3
route/list_admin_auth_use.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_admin_auth_use(arg_num = 1, arg_search = 'normal'):
+async def list_admin_auth_use(arg_num = 1, arg_search = 'normal'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -26,7 +26,7 @@ def list_admin_auth_use(arg_num = 1, arg_search = 'normal'):
                     curs.execute(db_change("select data from other where name = 'ip_view'"))
                     db_data = curs.fetchall()
                     ip_view = db_data[0][0] if db_data else ''
-                    ip_view = '' if acl_check(tool = 'ban_auth') != 1 else ip_view
+                    ip_view = '' if await acl_check(tool = 'ban_auth') != 1 else ip_view
                     
                     if ip_view != '':
                         do_data = do_data.split(' ')
@@ -40,7 +40,7 @@ def list_admin_auth_use(arg_num = 1, arg_search = 'normal'):
             arg_search = html.escape(arg_search) if arg_search != 'normal' else ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'authority_use_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'authority_use_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <input class="opennamu_width_200" name="search" placeholder="''' + get_lang(conn, 'start_with_search') + '''" value="''' + arg_search + '''">

+ 3 - 3
route/list_admin_group.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_admin_group_2():
+async def list_admin_group_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -9,7 +9,7 @@ def list_admin_group_2():
 
         curs.execute(db_change("select distinct name from alist order by name asc"))
         for data in curs.fetchall():
-            if acl_check('', 'owner_auth', '', '') != 1 and not data[0] in org_acl_list:
+            if await acl_check('', 'owner_auth', '', '') != 1 and not data[0] in org_acl_list:
                 delete_admin_group = ' <a href="/auth/list/delete/' + url_pas(data[0]) + '">(' + get_lang(conn, "delete") + ')</a>'
             else:
                 delete_admin_group = ''
@@ -28,7 +28,7 @@ def list_admin_group_2():
         ''
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'admin_group_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'admin_group_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = list_data,
             menu = [['manager', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_image_file.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_image_file(arg_num = 1, do_type = 0):
+async def list_image_file(arg_num = 1, do_type = 0):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -59,7 +59,7 @@ def list_image_file(arg_num = 1, do_type = 0):
             list_data += next_fix(conn, '/list/image/', arg_num, data_list)
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'image_file_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'image_file_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = list_data,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_long_page.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_long_page(tool = 'long_page', arg_num = 1):
+async def list_long_page(tool = 'long_page', arg_num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -26,7 +26,7 @@ def list_long_page(tool = 'long_page', arg_num = 1):
         div += '</ul>' + next_fix(conn, '/list/document/' + ('long' if title == 'long_page' else 'short') + '/', arg_num, n_list)
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, title), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, title), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = div,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_no_link.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_no_link(num = 1):
+async def list_no_link(num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
         
@@ -24,7 +24,7 @@ def list_no_link(num = 1):
         div += '</ul>' + next_fix(conn, '/list/document/no_link/', num, n_list)
         
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'no_link_document_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'no_link_document_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = div,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_please.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_please(arg_num = 1):
+async def list_please(arg_num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -20,7 +20,7 @@ def list_please(arg_num = 1):
         div += '</ul>' + next_fix(conn, '/list/document/need/', arg_num, data_list)
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'need_document'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'need_document'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = div,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_title_index.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_title_index(num = 1):
+async def list_title_index(num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -59,7 +59,7 @@ def list_title_index(num = 1):
         sub = ' (' + str(num) + ')'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'all_document_list'), wiki_set(conn), wiki_custom(conn), wiki_css([sub, 0])],
+            imp = [get_lang(conn, 'all_document_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([sub, 0])],
             data = data,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 2 - 2
route/list_user.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_user(arg_num = 1):
+async def list_user(arg_num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -19,7 +19,7 @@ def list_user(arg_num = 1):
         list_data += '</ul>' + next_fix(conn, '/list/user/', arg_num, user_list)
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'member_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'member_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = list_data,
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 8 - 8
route/list_user_check.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_user_check(name = 'test', plus_name = None, arg_num = 1, do_type = 'normal'):
+async def list_user_check(name = 'test', plus_name = None, arg_num = 1, do_type = 'normal'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -12,14 +12,14 @@ def list_user_check(name = 'test', plus_name = None, arg_num = 1, do_type = 'nor
         num = arg_num
         sql_num = (num * 50 - 50) if num * 50 > 0 else 0
 
-        if acl_check(tool = 'all_admin_auth', ip = name) != 1 or (plus_id and acl_check(tool = 'all_admin_auth', ip = plus_id) != 1):
-            if acl_check('', 'owner_auth', '', '') == 1:
-                return re_error(conn, 4)
+        if await acl_check(tool = 'all_admin_auth', ip = name) != 1 or (plus_id and await acl_check(tool = 'all_admin_auth', ip = plus_id) != 1):
+            if await acl_check('', 'owner_auth', '', '') == 1:
+                return await re_error(conn, 4)
 
         div = ''
 
-        if acl_check(tool = 'check_auth', memo = (check_type + ' ' if check_type != '' else '') + 'check (' + name + ')') == 1:
-            return re_error(conn, 3)
+        if await acl_check(tool = 'check_auth', memo = (check_type + ' ' if check_type != '' else '') + 'check (' + name + ')') == 1:
+            return await re_error(conn, 3)
 
         if check_type == '':
             if ip_or_user(name) == 0:
@@ -156,7 +156,7 @@ def list_user_check(name = 'test', plus_name = None, arg_num = 1, do_type = 'nor
                 name += ', ' + plus_id
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'check') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'check') + ')', 0])],
                 data = div,
                 menu = [['manager', get_lang(conn, 'return')]]
             ))
@@ -185,7 +185,7 @@ def list_user_check(name = 'test', plus_name = None, arg_num = 1, do_type = 'nor
             '' + div
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'simple_check') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'simple_check') + ')', 0])],
                 data = div,
                 menu = [['check/' + url_pas(name), get_lang(conn, 'return')]]
             ))

+ 4 - 4
route/list_user_check_delete.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def list_user_check_delete(name = None, ip = None, time = None, do_type = 1):
+async def list_user_check_delete(name = None, ip = None, time = None, do_type = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 4)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 4)
 
         user_id = name
         user_ip = ip
@@ -18,7 +18,7 @@ def list_user_check_delete(name = None, ip = None, time = None, do_type = 1):
                 return redirect(conn, '/list/user/check/' + url_pas(user_id if return_type == '0' else user_ip))
             else:
                 return easy_minify(conn, flask.render_template(skin_check(conn),
-                    imp = [get_lang(conn, 'check'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'delete') + ')', 0])],
+                    imp = [get_lang(conn, 'check'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'delete') + ')', 0])],
                     data = '''
                         ''' + get_lang(conn, 'name') + ''' : ''' + user_id + '''
                         <hr class="main_hr">

+ 2 - 2
route/login_find.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def login_find():
+async def login_find():
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'password_search'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'password_search'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '''
                 <ul>
                     <li><a href="/login/find/email">''' + get_lang(conn, 'email') + '''</a></li>

+ 8 - 8
route/login_find_email.py

@@ -1,7 +1,7 @@
 from .tool.func import *
 
 # 개편 필요
-def login_find_email(tool):
+async def login_find_email(tool):
     with get_db_connect() as conn:
         curs = conn.cursor()
         
@@ -37,7 +37,7 @@ def login_find_email(tool):
                     for i in re_set_list:
                         flask.session.pop(i, None)
                     
-                    return re_error(conn, 36)
+                    return await re_error(conn, 36)
         
             curs.execute(db_change('select data from other where name = "email_title"'))
             sql_d = curs.fetchall()
@@ -50,10 +50,10 @@ def login_find_email(tool):
             if tool == 'pass_find':
                 curs.execute(db_change("select id from user_set where id = ? and name = 'email' and data = ?"), [user_id, user_email])
                 if not curs.fetchall():
-                    return re_error(conn, 12)
+                    return await re_error(conn, 12)
                     
                 if send_email(conn, user_email, t_text, i_text) == 0:
-                    return re_error(conn, 18)
+                    return await re_error(conn, 18)
         
                 return redirect(conn, '/pass_find/email')
             else:
@@ -62,13 +62,13 @@ def login_find_email(tool):
                     for i in re_set_list:
                         flask.session.pop(i, None)
         
-                    return re_error(conn, 35)
+                    return await re_error(conn, 35)
                 
                 if send_email(conn, user_email, t_text, i_text) == 0:
                     for i in re_set_list:
                         flask.session.pop(i, None)
         
-                    return re_error(conn, 18)
+                    return await re_error(conn, 18)
         
                 flask.session['c_email'] = user_email
         
@@ -80,7 +80,7 @@ def login_find_email(tool):
                 b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
         
                 return easy_minify(conn, flask.render_template(skin_check(conn),
-                    imp = [get_lang(conn, 'password_search'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'email') + ')', 0])],
+                    imp = [get_lang(conn, 'password_search'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'email') + ')', 0])],
                     data = b_text + '''
                         <form method="post">
                             <input placeholder="''' + get_lang(conn, 'id') + '''" name="id" type="text">
@@ -101,7 +101,7 @@ def login_find_email(tool):
                 b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
         
                 return easy_minify(conn, flask.render_template(skin_check(conn),
-                    imp = [get_lang(conn, 'email'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                    imp = [get_lang(conn, 'email'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                     data = '''
                         <a href="/filter/email_filter">(''' + get_lang(conn, 'email_filter_list') + ''')</a>
                         <hr class="main_hr">

+ 5 - 5
route/login_find_email_check.py

@@ -1,7 +1,7 @@
 from .tool.func import *
 
 # 개편 필요
-def login_find_email_check(tool):
+async def login_find_email_check(tool):
     with get_db_connect() as conn:
         curs = conn.cursor()
         
@@ -31,7 +31,7 @@ def login_find_email_check(tool):
                 b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
         
                 return easy_minify(conn, flask.render_template(skin_check(conn),
-                    imp = [get_lang(conn, 'reset_user_ok'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                    imp = [get_lang(conn, 'reset_user_ok'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                     data = '' + \
                         b_text + \
                         get_lang(conn, 'id') + ' : ' + user_id + \
@@ -56,14 +56,14 @@ def login_find_email_check(tool):
                         for i in re_set_list:
                             flask.session.pop(i, None)
         
-                        return re_error(conn, 8)
+                        return await re_error(conn, 8)
                 
                     curs.execute(db_change("select id from user_set where id = ? and name = 'application'"), [flask.session['c_id']])
                     if curs.fetchall():
                         for i in re_set_list:
                             flask.session.pop(i, None)
         
-                        return re_error(conn, 8)
+                        return await re_error(conn, 8)
         
                     curs.execute(db_change('select data from other where name = "requires_approval"'))
                     requires_approval = curs.fetchall()
@@ -122,7 +122,7 @@ def login_find_email_check(tool):
             b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
         
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'check_key'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'check_key'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         ''' + b_text + '''

+ 6 - 6
route/login_find_key.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def login_find_key():
+async def login_find_key():
     with get_db_connect() as conn:
         curs = conn.cursor()
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
             
             input_key = flask.request.form.get('key', '')
             curs.execute(db_change('select id from user_set where name = "random_key" and data = ?'), [input_key])
@@ -30,7 +30,7 @@ def login_find_key():
             b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
             
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                    imp = [get_lang(conn, 'reset_user_ok'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                    imp = [get_lang(conn, 'reset_user_ok'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                     data = '' + \
                         b_text + \
                         get_lang(conn, 'id') + ' : ' + user_id + \
@@ -41,12 +41,12 @@ def login_find_key():
                 ))
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'password_search'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'password_search'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <input placeholder="''' + get_lang(conn, 'key') + '''" name="key" type="password">
                         <hr class="main_hr">
-                        ''' + captcha_get(conn) + '''
+                        ''' + await captcha_get(conn) + '''
                         <button type="submit">''' + get_lang(conn, 'send') + '''</button>
                     </form>
                 ''',

+ 9 - 9
route/login_login.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_login_2():
+async def login_login_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -9,11 +9,11 @@ def login_login_2():
             return redirect(conn, '/user')
 
         if ban_check(None, 'login')[0] == 1:
-            return re_error(conn, 0)
+            return await re_error(conn, 0)
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
             user_agent = flask.request.headers.get('User-Agent', '')
             user_id = flask.request.form.get('id', '')
@@ -22,19 +22,19 @@ def login_login_2():
             curs.execute(db_change("select data from user_set where id = ? and name = 'pw'"), [user_id])
             db_data = curs.fetchall()
             if not db_data:
-                return re_error(conn, 2)
+                return await re_error(conn, 2)
             else:
                 db_user_pw = db_data[0][0]
                 
             curs.execute(db_change("select data from user_set where id = ? and name = 'encode'"), [user_id])
             db_data = curs.fetchall()
             if not db_data:
-                return re_error(conn, 2)
+                return await re_error(conn, 2)
             else:
                 db_user_encode = db_data[0][0]
 
             if pw_check(conn, user_pw, db_user_pw, db_user_encode, user_id) != 1:
-                return re_error(conn, 10)
+                return await re_error(conn, 10)
 
             curs.execute(db_change('select data from user_set where name = "2fa" and id = ?'), [user_id])
             fa_data = curs.fetchall()
@@ -50,7 +50,7 @@ def login_login_2():
                 return redirect(conn, '/user')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'login'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'login'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data =  '''
                         <form method="post">
                             <input placeholder="''' + get_lang(conn, 'id') + '''" name="id" type="text">
@@ -59,7 +59,7 @@ def login_login_2():
                             <hr class="main_hr">
                             <!-- <label><input type="checkbox" name="auto_login"> ''' + get_lang(conn, 'auto_login') + ''' (''' + get_lang(conn, 'not_working') + ''')</label>
                             <hr class="main_hr"> -->
-                            ''' + captcha_get(conn) + '''
+                            ''' + await captcha_get(conn) + '''
                             <button type="submit">''' + get_lang(conn, 'login') + '''</button>
                             ''' + http_warning(conn) + '''
                         </form>

+ 7 - 7
route/login_login_2fa.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_login_2fa_2():
+async def login_login_2fa_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -15,11 +15,11 @@ def login_login_2fa_2():
             return redirect(conn, '/user')
 
         if ban_check(None, 'login')[0] == 1:
-            return re_error(conn, 0)
+            return await re_error(conn, 0)
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
             user_agent = flask.request.headers.get('User-Agent', '')
             user_id = flask.session['login_id']
@@ -34,7 +34,7 @@ def login_login_2fa_2():
 
                 pw_check_d = pw_check(conn, user_pw, user_1, user_2, user_id)
                 if pw_check_d != 1:
-                    return re_error(conn, 10)
+                    return await re_error(conn, 10)
 
             flask.session['id'] = user_id
 
@@ -50,12 +50,12 @@ def login_login_2fa_2():
             return redirect(conn, '/user')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'login'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'login'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data =  '''
                         <form method="post">
                             <input placeholder="''' + get_lang(conn, '2fa_password') + '''" name="pw" type="password">
                             <hr class="main_hr">
-                            ''' + captcha_get(conn) + '''
+                            ''' + await captcha_get(conn) + '''
                             <button type="submit">''' + get_lang(conn, 'login') + '''</button>
                             ''' + http_warning(conn) + '''
                         </form>

+ 7 - 7
route/login_login_2fa_email.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_login_2fa_email_2():
+async def login_login_2fa_email_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -15,11 +15,11 @@ def login_login_2fa_email_2():
             return redirect(conn, '/user')
 
         if ban_check(None, 'login')[0] == 1:
-            return re_error(conn, 0)
+            return await re_error(conn, 0)
 
         if flask.request.method == 'POST':
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
             user_agent = flask.request.headers.get('User-Agent', '')
             user_id = flask.session['b_id']
@@ -34,7 +34,7 @@ def login_login_2fa_email_2():
 
                 pw_check_d = pw_check(conn, user_pw, user_1, user_2, user_id)
                 if pw_check_d != 1:
-                    return re_error(conn, 10)
+                    return await re_error(conn, 10)
 
             flask.session['id'] = user_id
 
@@ -45,12 +45,12 @@ def login_login_2fa_email_2():
             return redirect(conn, '/user')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'login'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'login'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data =  '''
                         <form method="post">
                             <input placeholder="''' + get_lang(conn, '2fa_password') + '''" name="pw" type="password">
                             <hr class=\"main_hr\">
-                            ''' + captcha_get(conn) + '''
+                            ''' + await captcha_get(conn) + '''
                             <button type="submit">''' + get_lang(conn, 'login') + '''</button>
                             ''' + http_warning(conn) + '''
                         </form>

+ 1 - 1
route/login_logout.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_logout():
+async def login_logout():
     with get_db_connect() as conn:
         flask.session.pop('state', None)
         flask.session.pop('id', None)

+ 13 - 13
route/login_register.py

@@ -1,14 +1,14 @@
 from .tool.func import *
 
-def login_register_2():
+async def login_register_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         if ban_check(None, 'register')[0] == 1:
-            return re_error(conn, 0)
+            return await re_error(conn, 0)
 
         ip = ip_check()
-        admin = acl_check(tool = 'owner_auth')
+        admin = await acl_check(tool = 'owner_auth')
         admin = 1 if admin == 0 else 0
 
         if admin != 1 and ip_or_user(ip) == 0:
@@ -18,12 +18,12 @@ def login_register_2():
             curs.execute(db_change('select data from other where name = "reg"'))
             set_d = curs.fetchall()
             if set_d and set_d[0][0] == 'on':
-                return re_error(conn, 0)
+                return await re_error(conn, 0)
 
         if flask.request.method == 'POST':
             # 리캡차
-            if captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
-                return re_error(conn, 13)
+            if await captcha_post(conn, flask.request.form.get('g-recaptcha-response', flask.request.form.get('g-recaptcha', ''))) == 1:
+                return await re_error(conn, 13)
 
             user_id = flask.request.form.get('id', '')
             user_pw = flask.request.form.get('pw', '')
@@ -31,14 +31,14 @@ def login_register_2():
 
             # PW 검증
             if user_id == '' or user_pw == '':
-                return re_error(conn, 27)
+                return await re_error(conn, 27)
 
             if user_pw != user_repeat:
-                return re_error(conn, 20)
+                return await re_error(conn, 20)
             
             # ID와 PW 동일성 검증
             if user_id == user_pw:
-                return re_error(conn, 49)
+                return await re_error(conn, 49)
 
             # PW 길이 제한
             curs.execute(db_change("select data from other where name = 'password_min_length'"))
@@ -46,10 +46,10 @@ def login_register_2():
             if db_data and db_data[0][0] != '':
                 password_min_length = int(number_check(db_data[0][0]))
                 if password_min_length > len(user_pw):
-                    return re_error(conn, 40)
+                    return await re_error(conn, 40)
 
             if do_user_name_check(conn, user_id) == 1:
-                return re_error(conn, 8)
+                return await re_error(conn, 8)
 
             if admin != 1:
                 # 이메일 필요시 /register/email로 발송
@@ -88,7 +88,7 @@ def login_register_2():
                 password_min_length = ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'register'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'register'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         ''' + contract + '''
@@ -102,7 +102,7 @@ def login_register_2():
                         <input placeholder="''' + get_lang(conn, 'password_confirm') + '''" name="pw2" type="password">
                         <hr class="main_hr">
 
-                        ''' + captcha_get(conn) + '''
+                        ''' + await captcha_get(conn) + '''
 
                         <button type="submit">''' + get_lang(conn, 'save') + '''</button>
 

+ 4 - 4
route/login_register_email.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_register_email_2():
+async def login_register_email_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -38,10 +38,10 @@ def login_register_email_2():
 
             curs.execute(db_change('select id from user_set where name = "email" and data = ?'), [user_email])
             if curs.fetchall():
-                return re_error(conn, 35)
+                return await re_error(conn, 35)
 
             if send_email(conn, user_email, t_text, i_text) == 0:
-                return re_error(conn, 18)
+                return await re_error(conn, 18)
 
             flask.session['reg_email'] = user_email
 
@@ -52,7 +52,7 @@ def login_register_email_2():
             b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'email'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'email'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <a href="/filter/email_filter">(''' + get_lang(conn, 'email_filter_list') + ''')</a>
                     <hr class="main_hr">

+ 2 - 2
route/login_register_email_check.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_register_email_check_2():
+async def login_register_email_check_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -35,7 +35,7 @@ def login_register_email_check_2():
             b_text = (sql_d[0][0] + '<hr class="main_hr">') if sql_d and sql_d[0][0] != '' else ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'check_key'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'check_key'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         ''' + b_text + '''

+ 3 - 3
route/login_register_submit.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def login_register_submit_2():
+async def login_register_submit_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -50,10 +50,10 @@ def login_register_submit_2():
 
             curs.execute(db_change("insert into user_set (id, name, data) values (?, ?, ?)"), [user_app_data['id'], 'application', json.dumps(user_app_data)])
 
-            return re_error(conn, 43)
+            return await re_error(conn, 43)
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'approval_question'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'approval_question'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         ''' + get_lang(conn, 'approval_question') + ' : ' + data_que + '''

+ 3 - 3
route/main_func_error_404.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_func_error_404(e = ''):
+async def main_func_error_404(e = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -24,9 +24,9 @@ def main_func_error_404(e = ''):
 
                 if db_data != '':
                     return easy_minify(conn, flask.render_template(skin_check(conn),
-                        imp = ['404', wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                        imp = ['404', wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                         data = db_data,
                         menu = 0
                     )), 404
                 else:
-                    return re_error(conn, 46)
+                    return await re_error(conn, 46)

+ 1 - 1
route/main_search.py

@@ -1,5 +1,5 @@
 from .tool.func import *
 
-def main_search():
+async def main_search():
     with get_db_connect() as conn:
         return redirect(conn, '/search/' + url_pas(flask.request.form.get('search', 'test')))

+ 1 - 1
route/main_search_deep.py

@@ -63,7 +63,7 @@ async def main_search_deep(name = 'Test', search_type = 'title', num = 1):
                 div += get_next_page_bottom(conn, '/search_data_page/{}/' + url_pas(name), num, all_list)
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'search') + ')', 0])],
+                imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'search') + ')', 0])],
                 data = div,
                 menu = 0
             ))

+ 1 - 1
route/main_search_goto.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_search_goto(name = 'Test'):
+async def main_search_goto(name = 'Test'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 

+ 2 - 2
route/main_setting.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_setting():
+async def main_setting():
     with get_db_connect() as conn:
         li_list = [
             ['main', get_lang(conn, 'main_setting')],
@@ -19,7 +19,7 @@ def main_setting():
         li_data = ''.join(['<li><a href="/setting/' + str(li[0]) + '">' + li[1] + '</a></li>' for li in li_list])
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'setting'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '<h2>' + get_lang(conn, 'list') + '</h2><ul>' + li_data + '</ul>',
             menu = [['manager', get_lang(conn, 'return')]]
         ))

+ 4 - 4
route/main_setting_email_test.py

@@ -4,8 +4,8 @@ from .go_api_func_email import api_func_email
 
 async def main_setting_email_test():
     with get_db_connect() as conn:
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         if flask.request.method == 'POST':
             render_data = await api_func_email()
@@ -15,13 +15,13 @@ async def main_setting_email_test():
                 data = get_lang(conn, "error")
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, "email_test"), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, "email_test"), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = data,
                 menu = [["setting/external", get_lang(conn, 'return')]]
             ))
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, "email_test"), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, "email_test"), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <input name="title" placeholder="''' + get_lang(conn, "title") + '''">

+ 5 - 5
route/main_setting_external.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_external():
+async def main_setting_external():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         i_list = [
             'recaptcha',
@@ -26,7 +26,7 @@ def main_setting_external():
 
                 curs.execute(db_change("update other set data = ? where name = ?"), [into_data, data])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (external)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (external)')
 
             return redirect(conn, '/setting/external')
         else:
@@ -66,7 +66,7 @@ def main_setting_external():
                     re_ver += '<option value="' + i + '">' + re_ver_list[i] + '</option>'
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'ext_api_req_set'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'ext_api_req_set'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <h2>''' + get_lang(conn, 'captcha') + '''</h2>

+ 5 - 5
route/main_setting_head.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_head(num, skin_name = '', set_preview = 0):
+async def main_setting_head(num, skin_name = '', set_preview = 0):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         if flask.request.method == 'POST' and set_preview == 0:
             if num == 4:
@@ -30,7 +30,7 @@ def main_setting_head(num, skin_name = '', set_preview = 0):
             else:
                 curs.execute(db_change("insert into other (name, data, coverage) values (?, ?, ?)"), [info_d, flask.request.form.get('content', ''), coverage])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (' + info_d + ')')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (' + info_d + ')')
 
             if skin_name == '':
                 return redirect(conn, '/setting/' + end_r)
@@ -98,7 +98,7 @@ def main_setting_head(num, skin_name = '', set_preview = 0):
                 sub_plus = ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, data = 'main' + title, safe = 1), wiki_set(conn), wiki_custom(conn), wiki_css(['(HTML)' + sub_plus, 0])],
+                imp = [get_lang(conn, data = 'main' + title, safe = 1), wiki_set(conn), await wiki_custom(conn), wiki_css(['(HTML)' + sub_plus, 0])],
                 data = '''
                     <form method="post">
                         ''' + start + '''

+ 5 - 5
route/main_setting_main.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_main():
+async def main_setting_main():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         setting_list = {
             0 : ['name', 'Wiki'],
@@ -57,7 +57,7 @@ def main_setting_main():
                     setting_list[i][0]
                 ])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (main)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (main)')
 
             return redirect(conn, '/setting/main')
         else:
@@ -204,7 +204,7 @@ def main_setting_main():
             '''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'main_setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'main_setting'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         ''' + basic_set + '''

+ 5 - 5
route/main_setting_main_logo.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_main_logo():
+async def main_setting_main_logo():
     with get_db_connect() as conn:
         curs = conn.cursor()
         
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
 
         skin_list = [0] + load_skin(conn, '', 1)
         i_list = []
@@ -20,7 +20,7 @@ def main_setting_main_logo():
                     i[1]
                 ])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (logo)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (logo)')
 
             return redirect(conn, '/setting/main/logo')
         else:
@@ -45,7 +45,7 @@ def main_setting_main_logo():
                 ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'wiki_logo'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'wiki_logo'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         ''' + end_data + '''

+ 5 - 5
route/main_setting_phrase.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_phrase():
+async def main_setting_phrase():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         i_list = [
             'contract',
@@ -46,7 +46,7 @@ def main_setting_phrase():
         if flask.request.method == 'POST':
             curs.executemany(db_change("update other set data = ? where name = ?"), [[flask.request.form.get(for_a, ''), for_a] for for_a in i_list])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (phrase)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (phrase)')
 
             return redirect(conn, '/setting/phrase')
         else:
@@ -61,7 +61,7 @@ def main_setting_phrase():
                     d_list += ['']
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'text_setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'text_setting'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <h2>''' + get_lang(conn, 'register_text') + ''' (HTML)</h2>

+ 5 - 5
route/main_setting_robot.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_robot():
+async def main_setting_robot():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
 
         curs.execute(db_change("select data from other where name = 'robot'"))
         db_data = curs.fetchall()
@@ -32,12 +32,12 @@ def main_setting_robot():
             else:
                 curs.execute(db_change("insert into other (name, data, coverage) values ('robot_default', ?, '')"), [flask.request.form.get('default', '')])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (robot)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (robot)')
 
             return redirect(conn, '/setting/robot')
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = ['robots.txt', wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = ['robots.txt', wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <a href="/robots.txt">(''' + get_lang(conn, 'view') + ''')</a>
                     <hr class="main_hr">

+ 5 - 5
route/main_setting_sitemap.py

@@ -1,16 +1,16 @@
 from .tool.func import *
 
-def main_setting_sitemap(do_type = 0):
+async def main_setting_sitemap(do_type = 0):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         if not do_type == 1:
-            if acl_check('', 'owner_auth', '', '') == 1:
-                return re_error(conn, 0)
+            if await acl_check('', 'owner_auth', '', '') == 1:
+                return await re_error(conn, 0)
         
         if do_type == 1 or flask.request.method == 'POST':
             if not do_type == 1:
-                acl_check(tool = 'owner_auth', memo = 'make sitemap')
+                await acl_check(tool = 'owner_auth', memo = 'make sitemap')
 
             data = '' + \
                 '<?xml version="1.0" encoding="UTF-8"?>\n' + \
@@ -95,7 +95,7 @@ def main_setting_sitemap(do_type = 0):
                 return ''
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'sitemap_manual_create'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'sitemap_manual_create'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <button id="opennamu_save_button" type="submit">''' + get_lang(conn, 'create') + '''</button>

+ 5 - 5
route/main_setting_sitemap_set.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_sitemap_set():
+async def main_setting_sitemap_set():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         setting_list = {
             0 : ['sitemap_auto_exclude_domain', ''],
@@ -22,7 +22,7 @@ def main_setting_sitemap_set():
                     setting_list[i][0]
                 ])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (sitemap)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (sitemap)')
 
             return redirect(conn, '/setting/sitemap_set')
         else:
@@ -57,7 +57,7 @@ def main_setting_sitemap_set():
                     for_a += 1
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'sitemap_management'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'sitemap_management'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     ''' + sitemap_list + '''
                     <hr class="main_hr">

+ 5 - 5
route/main_setting_skin_set.py

@@ -2,12 +2,12 @@ from .tool.func import *
 
 from .user_setting_skin_set_main import user_setting_skin_set_main_set_list
 
-def main_setting_skin_set():
+async def main_setting_skin_set():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
             
         set_list = user_setting_skin_set_main_set_list(conn)
 
@@ -19,7 +19,7 @@ def main_setting_skin_set():
                 else:
                     curs.execute(db_change('insert into other (name, data, coverage) values (?, ?, "")'), [for_b, flask.request.form.get(for_b, set_list[for_b][0][0])])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (skin_set)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (skin_set)')
 
             return redirect(conn, '/setting/skin_set')
         else:
@@ -40,7 +40,7 @@ def main_setting_skin_set():
             set_data_main = { for_b : '' for for_b in set_list }
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'main_skin_set_default'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'beta') + ')', 0])],
+                imp = [get_lang(conn, 'main_skin_set_default'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'beta') + ')', 0])],
                 data = render_simple_set(conn, '''
                     <form method="post">
                         <h2>''' + get_lang(conn, "render") + '''</h2>

+ 5 - 5
route/main_setting_top_menu.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def main_setting_top_menu():
+async def main_setting_top_menu():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 0)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 0)
         
         if flask.request.method == 'POST':
             curs.execute(db_change("select name from other where name = 'top_menu'"))
@@ -14,7 +14,7 @@ def main_setting_top_menu():
             else:
                 curs.execute(db_change("insert into other (name, data, coverage) values ('top_menu', ?, '')"), [flask.request.form.get('content', '')])
 
-            acl_check(tool = 'owner_auth', memo = 'edit_set (top_menu)')
+            await acl_check(tool = 'owner_auth', memo = 'edit_set (top_menu)')
 
             return redirect(conn, '/setting/top_menu')
         else:
@@ -23,7 +23,7 @@ def main_setting_top_menu():
             db_data = db_data[0][0] if db_data else ''
             
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'top_menu_setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'top_menu_setting'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <span>
                         EX)

+ 6 - 6
route/main_sys_restart.py

@@ -1,12 +1,12 @@
 from .tool.func import *
 
-def main_sys_restart():
+async def main_sys_restart():
     with get_db_connect() as conn:
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 3)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 3)
 
         if flask.request.method == 'POST':
-            acl_check(tool = 'owner_auth', memo = 'restart')
+            await acl_check(tool = 'owner_auth', memo = 'restart')
 
             print('Restart')
 
@@ -30,10 +30,10 @@ def main_sys_restart():
                 except:
                     pass
             else:
-                return re_error(conn, 33)
+                return await re_error(conn, 33)
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'wiki_restart'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'wiki_restart'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <div id="opennamu_main_sys_restart"></div>
                     <script defer src="/views/main_css/js/route/main_sys_restart.js''' + cache_v() + '''"></script>

+ 5 - 5
route/main_sys_shutdown.py

@@ -1,19 +1,19 @@
 from .tool.func import *
 
-def main_sys_shutdown():
+async def main_sys_shutdown():
     with get_db_connect() as conn:
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 3)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 3)
 
         if flask.request.method == 'POST':
-            acl_check(tool = 'owner_auth', memo = 'shutdown')
+            await acl_check(tool = 'owner_auth', memo = 'shutdown')
 
             print('Shutdown')
 
             os._exit(0)
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'wiki_shutdown'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'wiki_shutdown'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         <button type="submit">''' + get_lang(conn, 'shutdown') + '''</button>

+ 6 - 6
route/main_sys_update.py

@@ -3,15 +3,15 @@ import urllib.request
 
 from .tool.func import *
 
-def main_sys_update():
+async def main_sys_update():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if acl_check('', 'owner_auth', '', '') == 1:
-            return re_error(conn, 3)
+        if await acl_check('', 'owner_auth', '', '') == 1:
+            return await re_error(conn, 3)
 
         if flask.request.method == 'POST':
-            acl_check(tool = 'owner_auth', memo = 'update')
+            await acl_check(tool = 'owner_auth', memo = 'update')
 
             curs.execute(db_change('select data from other where name = "update"'))
             up_data = curs.fetchall()
@@ -50,10 +50,10 @@ def main_sys_update():
             
             print('Error : update failed')
 
-            return re_error(conn, 34)
+            return await re_error(conn, 34)
         else:
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'update'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'update'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = get_lang(conn, 'update_warning') + '''
                     <hr class="main_hr">
                     <ul>

+ 2 - 2
route/main_tool_admin.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def main_tool_admin():
+async def main_tool_admin():
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'admin_tool'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'admin_tool'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = render_simple_set(conn, '''
                 <h2>''' + get_lang(conn, 'admin') + '''</h2>
                 <ul>

+ 2 - 2
route/main_tool_other.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def main_tool_other():
+async def main_tool_other():
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'other_tool'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'other_tool'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = render_simple_set(conn, '''
                 <h2>''' + get_lang(conn, 'user_tool') + '''</h2>
                 <ul>

+ 2 - 2
route/main_tool_redirect.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_tool_redirect(num = 1, add_2 = ''):
+async def main_tool_redirect(num = 1, add_2 = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -57,7 +57,7 @@ def main_tool_redirect(num = 1, add_2 = ''):
                     ''
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [title_list[num][2], wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [title_list[num][2], wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = '''
                     <form method="post">
                         ''' + top_plus + '''

+ 1 - 1
route/main_view.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_view(name = ''):
+async def main_view(name = ''):
     with get_db_connect() as conn:
         file_name = re.search(r'([^/]+)$', name)
         if not file_name:

+ 1 - 1
route/main_view_file.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_view_file(data = ''):
+async def main_view_file(data = ''):
     with get_db_connect() as conn:
         if data == 'robots.txt':
             curs = conn.cursor()

+ 3 - 3
route/main_view_image.py

@@ -1,8 +1,8 @@
 from .tool.func import *
 
-def main_view_image(name = ''):
+async def main_view_image(name = ''):
     with get_db_connect() as conn:
-        if acl_check('', 'render') != 1:
+        if await acl_check('', 'render') != 1:
             name = re.sub(r'\.cache_v(?:[0-9]+)$', '', name)
             mime_type = re.search(r'([^.]+)$', name)
             if mime_type:
@@ -14,4 +14,4 @@ def main_view_image(name = ''):
             else:
                 return ''
         else:
-            return re_error(conn, 0)
+            return await re_error(conn, 0)

+ 2 - 2
route/n_bbs_in.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_in(bbs_num = 1, page = 1):
+async def bbs_in(bbs_num = 1, page = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -14,7 +14,7 @@ def bbs_in(bbs_num = 1, page = 1):
         bbs_name = db_data[0][0]
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [bbs_name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'bbs') + ') (' + str(page) + ')', 0])],
+            imp = [bbs_name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'bbs') + ') (' + str(page) + ')', 0])],
             data = '' + \
                 '<div id="opennamu_bbs_in"></div>' + \
                 '<script defer src="/views/main_css/js/route/bbs_in.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_bbs_main.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def bbs_main():
+async def bbs_main():
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'bbs_main'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'bbs_main'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '' + \
                 '<div id="opennamu_bbs_main"></div>' + \
                 '<script defer src="/views/main_css/js/route/bbs_main.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_bbs_w_set.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def bbs_w_set(bbs_num = ''):
+async def bbs_w_set(bbs_num = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -14,7 +14,7 @@ def bbs_w_set(bbs_num = ''):
         bbs_num_str = str(bbs_num)
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'bbs_set'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + bbs_name + ')', 0])],
+            imp = [get_lang(conn, 'bbs_set'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + bbs_name + ')', 0])],
             data = '' + \
                 '<div id="opennamu_bbs_w_set"></div>' + \
                 '<script defer src="/views/main_css/js/route/bbs_w_set.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_edit_move_all.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def edit_move_all():
+async def edit_move_all():
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'multiple_move'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'multiple_move'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '' + \
                 '<div id="opennamu_edit_move_all"></div>' + \
                 '<script defer src="/views/main_css/js/route/edit_move_all.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_give_auth.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def give_auth(user_name = ''):
+async def give_auth(user_name = ''):
     with get_db_connect() as conn:
         if user_name == '':
             user_name = get_lang(conn, 'authorize')
@@ -9,7 +9,7 @@ def give_auth(user_name = ''):
             sub = '(' + get_lang(conn, 'authorize') + ')'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [user_name, wiki_set(conn), wiki_custom(conn), wiki_css([sub, 0])],
+            imp = [user_name, wiki_set(conn), await wiki_custom(conn), wiki_css([sub, 0])],
             data = '' + \
                 '<div id="opennamu_give_auth"></div>' + \
                 '<script defer src="/views/main_css/js/route/give_auth.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_list_history.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def list_history(num = 1, set_type = 'normal', doc_name = 'Test'):
+async def list_history(num = 1, set_type = 'normal', doc_name = 'Test'):
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [doc_name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'history') + ')', 0])],
+            imp = [doc_name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'history') + ')', 0])],
             data = '' + \
                 '<div id="opennamu_list_history"></div>' + \
                 '<script defer src="/views/main_css/js/route/list_history.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_list_old_page.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_old_page(num = 1, set_type = 'old'):
+async def list_old_page(num = 1, set_type = 'old'):
     with get_db_connect() as conn:
         title = ''
         if set_type == 'old':
@@ -9,7 +9,7 @@ def list_old_page(num = 1, set_type = 'old'):
             title = get_lang(conn, 'new_page')
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [title, wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [title, wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '' + \
                 '<div id="opennamu_list_old_page"></div>' + \
                 '<script defer src="/views/main_css/js/route/list_old_page.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_list_recent_block.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_recent_block(user_name = 'Test', tool = 'all', num = 1, why = ''):
+async def list_recent_block(user_name = 'Test', tool = 'all', num = 1, why = ''):
     with get_db_connect() as conn:
         sub = 0
         if tool == 'ongoing':
@@ -17,7 +17,7 @@ def list_recent_block(user_name = 'Test', tool = 'all', num = 1, why = ''):
             sub = '(' + get_lang(conn, 'admin') + ')'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'recent_ban'), wiki_set(conn), wiki_custom(conn), wiki_css([sub, 0])],
+            imp = [get_lang(conn, 'recent_ban'), wiki_set(conn), await wiki_custom(conn), wiki_css([sub, 0])],
             data = '' + \
                 '<div id="opennamu_list_recent_block"></div>' + \
                 '<script defer src="/views/main_css/js/route/list_recent_block.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_list_recent_change.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def list_recent_change(num = 1, set_type = 'normal'):
+async def list_recent_change(num = 1, set_type = 'normal'):
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'recent_change'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, set_type) + ')', 0])],
+            imp = [get_lang(conn, 'recent_change'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, set_type) + ')', 0])],
             data = '' + \
                 '<div id="opennamu_list_recent_change"></div>' + \
                 '<script defer src="/views/main_css/js/route/list_recent_change.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_list_recent_discuss.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def list_recent_discuss(num = 1, tool = 'normal'):
+async def list_recent_discuss(num = 1, tool = 'normal'):
     with get_db_connect() as conn:
         m_sub = 0
         if tool == 'close':
@@ -9,7 +9,7 @@ def list_recent_discuss(num = 1, tool = 'normal'):
             m_sub = '(' + get_lang(conn, 'open_discussion') + ')'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'recent_discussion'), wiki_set(conn), wiki_custom(conn), wiki_css([m_sub, 0])],
+            imp = [get_lang(conn, 'recent_discussion'), wiki_set(conn), await wiki_custom(conn), wiki_css([m_sub, 0])],
             data = '' + \
                 '<div id="opennamu_list_recent_discuss"></div>' + \
                 '<script defer src="/views/main_css/js/route/list_recent_discuss.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_list_user_check_submit.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def list_user_check_submit(name = 'Test'):
+async def list_user_check_submit(name = 'Test'):
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'check') + ')', 0])],
+            imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'check') + ')', 0])],
             data = '' + \
                 '<div id="opennamu_list_user_check_submit"></div>' + \
                 '<script defer src="/views/main_css/js/route/list_user_check_submit.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_main_redirect.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def main_redirect(n = 1):
+async def main_redirect(n = 1):
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'redirect'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, 'redirect'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '' + \
                 '<div id="opennamu_main_redirect"></div>' + \
                 '<script defer src="/views/main_css/js/route/main_redirect.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_setting_404_page.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def setting_404_page():
+async def setting_404_page():
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, '404_page_setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            imp = [get_lang(conn, '404_page_setting'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
             data = '' + \
                 '<div id="opennamu_setting_404_page"></div>' + \
                 '<script defer src="/views/main_css/js/route/setting_404_page.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_topic_list.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def topic_list(page = 1, name = 'Test'):
+async def topic_list(page = 1, name = 'Test'):
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'discussion_list') + ')', 0])],
+            imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'discussion_list') + ')', 0])],
             data = '' + \
                 '<div id="opennamu_topic_list"></div>' + \
                 '<script defer src="/views/main_css/js/route/topic_list.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_user_rankup.py

@@ -1,11 +1,11 @@
 from .tool.func import *
 
-def user_rankup():
+async def user_rankup():
     with get_db_connect() as conn:
         ip = ip_check()
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'rankup'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + ip + ')', 0])],
+            imp = [get_lang(conn, 'rankup'), wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + ip + ')', 0])],
             data = '' + \
                 '<div id="opennamu_user_rankup"></div>' + \
                 '<script defer src="/views/main_css/js/route/user_rankup.js' + cache_v() + '"></script>' + \

+ 2 - 2
route/n_w_watch_list.py

@@ -1,9 +1,9 @@
 from .tool.func import *
 
-def w_watch_list(name, num = 1, do_type = 'watch_list'):
+async def w_watch_list(name, num = 1, do_type = 'watch_list'):
     with get_db_connect() as conn:
         return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, do_type if do_type == 'star_doc' else 'watchlist') + ')', 0])],
+            imp = [name, wiki_set(conn), await wiki_custom(conn), wiki_css(['(' + get_lang(conn, do_type if do_type == 'star_doc' else 'watchlist') + ')', 0])],
             data = '' + \
                 '<div id="opennamu_w_watch_list"></div>' + \
                 '<script defer src="/views/main_css/js/route/w_watch_list.js' + cache_v() + '"></script>' + \

+ 5 - 5
route/recent_app_submit.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def recent_app_submit_2():
+async def recent_app_submit_2():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -87,19 +87,19 @@ def recent_app_submit_2():
                 div += get_lang(conn, 'no_applications_now')
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'application_list'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                imp = [get_lang(conn, 'application_list'), wiki_set(conn), await wiki_custom(conn), wiki_css([0, 0])],
                 data = div,
                 menu = [['other', get_lang(conn, 'return')]]
             ))
         else:
-            if acl_check(tool = 'ban_auth', memo = 'app submit') == 1:
-                return re_error(conn, 0)
+            if await acl_check(tool = 'ban_auth', memo = 'app submit') == 1:
+                return await re_error(conn, 0)
 
             if flask.request.form.get('approve', '') != '':
                 curs.execute(db_change('select data from user_set where id = ? and name = "application"'), [flask.request.form.get('approve', '')])
                 application = curs.fetchall()
                 if not application:
-                    return re_error(conn, 26)
+                    return await re_error(conn, 26)
                 else:
                     application = orjson.loads(application[0][0])
 

+ 4 - 4
route/recent_change.py

@@ -23,16 +23,16 @@ def recent_change_send_render(data):
 
     return data
 
-def recent_change(name = '', tool = '', num = 1, set_type = 'normal'):
+async def recent_change(name = '', tool = '', num = 1, set_type = 'normal'):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
         ip = ip_check()
         
-        all_admin = acl_check(tool = 'all_admin_auth', ip = ip)
+        all_admin = await acl_check(tool = 'all_admin_auth', ip = ip)
         all_admin = 1 if all_admin == 0 else 0
 
-        owner = acl_check(tool = 'owner_auth', ip = ip)
+        owner = await acl_check(tool = 'owner_auth', ip = ip)
         owner = 1 if owner == 0 else 0
 
         option_list = [
@@ -242,7 +242,7 @@ def recent_change(name = '', tool = '', num = 1, set_type = 'normal'):
                 sub = 0
 
             return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [title, wiki_set(conn), wiki_custom(conn), wiki_css([sub, 0])],
+                imp = [title, wiki_set(conn), await wiki_custom(conn), wiki_css([sub, 0])],
                 data = div,
                 menu = menu
             ))

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác