Procházet zdrojové kódy

에러창 통일 2

잉여개발기 (SPDV) před 6 roky
rodič
revize
21a8d2c33a
1 změnil soubory, kde provedl 3 přidání a 15 odebrání
  1. 3 15
      route/login_oauth.py

+ 3 - 15
route/login_oauth.py

@@ -32,17 +32,9 @@ def login_oauth_2(conn, platform, func):
 
     if func == 'init':
         if oauth_data['client_id'] == '' or oauth_data['client_secret'] == '':
-            return easy_minify(flask.render_template(skin_check(),
-                imp = [load_lang('error'), wiki_set(), custom(), other2([0, 0])],
-                data = load_lang('oauth_disabled'),
-                menu = [['user', load_lang('return')]]
-            ))
+            return re_error('/error/31')
         elif publish_url == 'https://':
-            return easy_minify(flask.render_template(skin_check(),
-                imp = [load_lang('error'), wiki_set(), custom(), other2([0, 0])],
-                data = load_lang('oauth_setting_not_found'),
-                menu = [['user', load_lang('return')]]
-            ))
+            return re_error('/error/32')
 
         referrer_re = re.compile(r'(?P<host>^(https?):\/\/([^\/]+))\/(?P<refer>[^\/?]+)')
         if flask.request.referrer != None:
@@ -84,11 +76,7 @@ def login_oauth_2(conn, platform, func):
         state = flask.request.args.get('state')
 
         if code == None:
-            return easy_minify(flask.render_template(skin_check(),
-                imp = [load_lang('inter_error'), wiki_set(), custom(), other2([0, 0])],
-                data = '<h2>ie_wrong_callback</h2>' + load_lang('ie_wrong_callback'),
-                menu = [['user', load_lang('return')]]
-            ))
+            return re_error('/error/30')
 
         if platform == 'discord':
             data = {