Преглед изворни кода

잘못 일괄 변경되서 생긴 버그 수정

https://github.com/openNAMU/openNAMU/issues/1842
잉여개발기 (SPDV) пре 2 година
родитељ
комит
24f5422f5e
6 измењених фајлова са 8 додато и 8 уклоњено
  1. 1 1
      route/api_bbs_w_comment.py
  2. 1 1
      route/api_bbs_w_post.py
  3. 1 1
      route/bbs_w_post.py
  4. 1 1
      route/edit_delete_file.py
  5. 3 3
      route/main_view_file.py
  6. 1 1
      version.json

+ 1 - 1
route/api_bbs_w_comment.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_bbs_w_comment(sub_code : str = '') -> typing.Union[str, werkzeug.wrappers.response.Response]:
+def api_bbs_w_comment(sub_code : str = '') -> typing.Union[str, flask.Response, werkzeug.wrappers.response.Response]:
     conn : typing.Union[sqlite3.Connection, pymysql.connections.Connection]
     with get_db_connect() as conn:
         curs : typing.Union[sqlite3.Cursor, pymysql.cursors.Cursor] = conn.cursor()

+ 1 - 1
route/api_bbs_w_post.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_bbs_w_post(sub_code : str = '') -> typing.Union[str, werkzeug.wrappers.response.Response]:
+def api_bbs_w_post(sub_code : str = '') -> typing.Union[str, flask.Response, werkzeug.wrappers.response.Response]:
     sub_code_split : typing.List[str] = sub_code.split('-')
     if len(sub_code_split) < 2:
         sub_code_split = ['', '']

+ 1 - 1
route/bbs_w_post.py

@@ -83,7 +83,7 @@ def bbs_w_post_comment(user_id : str, sub_code : str, comment_num : str, bbs_num
 
     return (comment_data, comment_select, comment_count, comment_add_count)
 
-def bbs_w_post(bbs_num : typing.Union[int, str] = '', post_num : typing.Union[int, str] = '', do_type : str = '') -> typing.Union[str, werkzeug.wrappers.response.Response]:
+def bbs_w_post(bbs_num : typing.Union[int, str] = '', post_num : typing.Union[int, str] = '', do_type : str = '') -> typing.Union[str, flask.Response, werkzeug.wrappers.response.Response]:
     conn : typing.Union[sqlite3.Connection, pymysql.connections.Connection]
     with get_db_connect() as conn:
         curs : typing.Union[sqlite3.Cursor, pymysql.cursors.Cursor] = conn.cursor()

+ 1 - 1
route/edit_delete_file.py

@@ -4,7 +4,7 @@ from .edit_delete import edit_delete
 
 # 처음으로 차세대 코드 방법론 적용
 # 앞으로 다 이렇게 작성할 예정
-def edit_delete_file(name : str = 'test.jpg') -> typing.Union[str, werkzeug.wrappers.response.Response]:
+def edit_delete_file(name : str = 'test.jpg') -> typing.Union[str, flask.Response, werkzeug.wrappers.response.Response]:
     conn : typing.Union[sqlite3.Connection, pymysql.connections.Connection]
     with get_db_connect() as conn:
         curs : typing.Union[sqlite3.Cursor, pymysql.cursors.Cursor] = conn.cursor()

+ 3 - 3
route/main_view_file.py

@@ -9,14 +9,14 @@ def main_view_file(data = ''):
             curs.execute(db_change("select data from other where name = 'robot_default'"))
             db_data = curs.fetchall()
             if db_data and db_data[0][0] != '':
-                return typing.Union[str, werkzeug.wrappers.response.Response](get_default_robots_txt(), mimetype = 'text/plain')
+                return flask.Response(get_default_robots_txt(), mimetype = 'text/plain')
             else:
                 curs.execute(db_change("select data from other where name = 'robot'"))
                 db_data = curs.fetchall()
                 if db_data:
-                    return typing.Union[str, werkzeug.wrappers.response.Response](db_data[0][0], mimetype = 'text/plain')
+                    return flask.Response(db_data[0][0], mimetype = 'text/plain')
                 else:
-                    return typing.Union[str, werkzeug.wrappers.response.Response](get_default_robots_txt(), mimetype = 'text/plain')
+                    return flask.Response(get_default_robots_txt(), mimetype = 'text/plain')
         elif os.path.exists(data):
             if re.search(r'\.txt$', data, flags = re.I):
                 return flask.send_from_directory('./', data, mimetype = 'text/plain')

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.6-RC3-dev197",
+        "r_ver" : "v3.4.6-RC3-dev198",
         "c_ver" : "3500361",
         "s_ver" : "3500111"
     }