|
|
@@ -586,11 +586,11 @@ app.route('/filter/extension_filter/add', methods = ['POST', 'GET'], defaults =
|
|
|
app.route('/filter/extension_filter/del/<everything:name>', defaults = { 'tool' : 'extension_filter' })(filter_all_delete)
|
|
|
|
|
|
# Func-list
|
|
|
-app.route('/list/document/old', defaults = { 'set_type' : 'old' })(list_old_page)
|
|
|
-app.route('/list/document/old/<int:num>', defaults = { 'set_type' : 'old' })(list_old_page)
|
|
|
+app.route('/list/document/old')(golang_view())
|
|
|
+app.route('/list/document/old/<int:num>')(golang_view())
|
|
|
|
|
|
-app.route('/list/document/new', defaults = { 'set_type' : 'new' })(list_old_page)
|
|
|
-app.route('/list/document/new/<int:num>', defaults = { 'set_type' : 'new' })(list_old_page)
|
|
|
+app.route('/list/document/new')(golang_view())
|
|
|
+app.route('/list/document/new/<int:num>')(golang_view())
|
|
|
|
|
|
app.route('/list/document/no_link')(list_no_link)
|
|
|
app.route('/list/document/no_link/<int:num>')(list_no_link)
|
|
|
@@ -604,11 +604,11 @@ app.route('/list/document/need/<int:arg_num>')(list_please)
|
|
|
app.route('/list/document/all')(list_title_index)
|
|
|
app.route('/list/document/all/<int:num>')(list_title_index)
|
|
|
|
|
|
-app.route('/list/document/long')(list_long_page)
|
|
|
-app.route('/list/document/long/<int:arg_num>')(list_long_page)
|
|
|
+app.route('/list/document/long')(golang_view())
|
|
|
+app.route('/list/document/long/<int:arg_num>')(golang_view())
|
|
|
|
|
|
-app.route('/list/document/short', defaults = { 'tool' : 'short_page' })(list_long_page)
|
|
|
-app.route('/list/document/short/<int:arg_num>', defaults = { 'tool' : 'short_page' })(list_long_page)
|
|
|
+app.route('/list/document/short')(golang_view())
|
|
|
+app.route('/list/document/short/<int:arg_num>')(golang_view())
|
|
|
|
|
|
app.route('/list/file')(list_image_file)
|
|
|
app.route('/list/file/<int:arg_num>')(list_image_file)
|
|
|
@@ -879,10 +879,10 @@ app.route('/api/raw_exist/<everything:name>', defaults = { 'exist_check' : 'on'
|
|
|
app.route('/api/raw_rev/<int(signed = True):rev>/<everything:name>')(api_w_raw)
|
|
|
app.route('/api/raw/<everything:name>')(api_w_raw)
|
|
|
|
|
|
-app.route('/api/xref/<int:page>/<everything:name>')(api_w_xref)
|
|
|
-app.route('/api/xref_this/<int:page>/<everything:name>', defaults = { 'xref_type' : '2' })(api_w_xref)
|
|
|
+app.route('/api/xref/<int:page>/<everything:name>')(golang_view())
|
|
|
+app.route('/api/xref_this/<int:page>/<everything:name>')(golang_view())
|
|
|
|
|
|
-app.route('/api/random')(api_w_random)
|
|
|
+app.route('/api/random')(golang_view())
|
|
|
|
|
|
app.route('/api/bbs/w/<sub_code>')(api_bbs_w)
|
|
|
app.route('/api/bbs/w/comment/<sub_code>')(api_bbs_w_comment_exter)
|
|
|
@@ -891,70 +891,70 @@ app.route('/api/bbs/w/comment_one/<sub_code>')(api_bbs_w_comment_one_exter)
|
|
|
app.route('/api/version', defaults = { 'version_list' : version_list })(api_version)
|
|
|
app.route('/api/skin_info')(api_skin_info)
|
|
|
app.route('/api/skin_info/<name>')(api_skin_info)
|
|
|
-app.route('/api/user_info/<user_name>')(api_user_info)
|
|
|
+app.route('/api/user_info/<user_name>')(golang_view())
|
|
|
|
|
|
app.route('/api/thread/<int:topic_num>/<int:s_num>/<int:e_num>')(api_topic)
|
|
|
app.route('/api/thread/<int:topic_num>/<tool>')(api_topic)
|
|
|
app.route('/api/thread/<int:topic_num>')(api_topic)
|
|
|
|
|
|
-app.route('/api/search/<everything:name>')(api_func_search_exter)
|
|
|
-app.route('/api/search_page/<int:num>/<everything:name>')(api_func_search_exter)
|
|
|
-app.route('/api/search_data/<everything:name>', defaults = { 'search_type' : 'data' })(api_func_search_exter)
|
|
|
-app.route('/api/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data' })(api_func_search_exter)
|
|
|
+app.route('/api/search/<everything:name>')(golang_view())
|
|
|
+app.route('/api/search_page/<int:num>/<everything:name>')(golang_view())
|
|
|
+app.route('/api/search_data/<everything:name>', defaults = { 'search_type' : 'data' })(golang_view())
|
|
|
+app.route('/api/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data' })(golang_view())
|
|
|
|
|
|
-app.route('/api/recent_change')(api_list_recent_change_exter)
|
|
|
-app.route('/api/recent_changes')(api_list_recent_change_exter)
|
|
|
-app.route('/api/recent_change/<int:limit>')(api_list_recent_change_exter)
|
|
|
-app.route('/api/recent_change/<int:limit>/<set_type>/<int:num>')(api_list_recent_change_exter)
|
|
|
+app.route('/api/recent_change')(golang_view())
|
|
|
+app.route('/api/recent_changes')(golang_view())
|
|
|
+app.route('/api/recent_change/<int:limit>')(golang_view())
|
|
|
+app.route('/api/recent_change/<int:limit>/<set_type>/<int:num>')(golang_view())
|
|
|
|
|
|
app.route('/api/recent_edit_request')(api_list_recent_edit_request_exter)
|
|
|
app.route('/api/recent_edit_request/<int:limit>/<set_type>/<int:num>')(api_list_recent_edit_request_exter)
|
|
|
|
|
|
-app.route('/api/recent_discuss/<set_type>/<int:limit>')(api_list_recent_discuss)
|
|
|
-app.route('/api/recent_discuss/<int:limit>')(api_list_recent_discuss)
|
|
|
-app.route('/api/recent_discuss')(api_list_recent_discuss)
|
|
|
+app.route('/api/recent_discuss/<set_type>/<int:limit>')(golang_view())
|
|
|
+app.route('/api/recent_discuss/<int:limit>')(golang_view())
|
|
|
+app.route('/api/recent_discuss')(golang_view())
|
|
|
|
|
|
app.route('/api/lang', methods = ['POST'])(api_func_language_exter)
|
|
|
app.route('/api/lang/<data>')(api_func_language_exter)
|
|
|
-app.route('/api/sha224/<everything:data>')(api_func_sha224)
|
|
|
+app.route('/api/sha224/<everything:data>')(golang_view())
|
|
|
app.route('/api/ip/<everything:data>')(api_func_ip)
|
|
|
|
|
|
app.route('/api/image/<everything:name>')(api_image_view)
|
|
|
|
|
|
## v2 API
|
|
|
app.route('/api/v2/recent_edit_request/<set_type>/<int:num>', defaults = { 'limit' : 50 })(api_list_recent_edit_request)
|
|
|
-app.route('/api/v2/recent_change/<set_type>/<int:num>', defaults = { 'legacy' : '', 'limit' : 50 })(api_list_recent_change_exter)
|
|
|
-app.route('/api/v2/recent_discuss/<set_type>/<int:num>', defaults = { 'legacy' : '', 'limit' : 50 })(api_list_recent_discuss)
|
|
|
-app.route('/api/v2/recent_block/<set_type>/<int:num>')(api_list_recent_block)
|
|
|
-app.route('/api/v2/recent_block/<set_type>/<int:num>/<everything:why>')(api_list_recent_block)
|
|
|
-app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>')(api_list_recent_block)
|
|
|
-app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>/<everything:why>')(api_list_recent_block)
|
|
|
-app.route('/api/v2/list/document/old/<int:num>', defaults = { 'set_type' : 'old' })(api_list_old_page_exter)
|
|
|
-app.route('/api/v2/list/document/new/<int:num>', defaults = { 'set_type' : 'new' })(api_list_old_page_exter)
|
|
|
-app.route('/api/v2/list/document/<int:num>')(api_list_title_index)
|
|
|
-app.route('/api/v2/list/auth')(api_list_auth)
|
|
|
-app.route('/api/v2/list/markup')(api_list_markup)
|
|
|
+app.route('/api/v2/recent_change/<set_type>/<int:num>')(golang_view())
|
|
|
+app.route('/api/v2/recent_discuss/<set_type>/<int:num>')(golang_view())
|
|
|
+app.route('/api/v2/recent_block/<set_type>/<int:num>')(golang_view())
|
|
|
+app.route('/api/v2/recent_block/<set_type>/<int:num>/<everything:why>')(golang_view())
|
|
|
+app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>')(golang_view())
|
|
|
+app.route('/api/v2/recent_block_user/<set_type>/<int:num>/<user_name>/<everything:why>')(golang_view())
|
|
|
+app.route('/api/v2/list/document/old/<int:num>')(golang_view())
|
|
|
+app.route('/api/v2/list/document/new/<int:num>')(golang_view())
|
|
|
+app.route('/api/v2/list/document/<int:num>')(golang_view())
|
|
|
+app.route('/api/v2/list/auth')(golang_view())
|
|
|
+app.route('/api/v2/list/markup')(golang_view())
|
|
|
app.route('/api/v2/list/acl/<data_type>')(api_list_acl)
|
|
|
-app.route('/api/v2/history/<int:num>/<set_type>/<everything:doc_name>')(api_list_history_exter)
|
|
|
+app.route('/api/v2/history/<int:num>/<set_type>/<everything:doc_name>')(golang_view())
|
|
|
|
|
|
-app.route('/api/v2/topic/<int:num>/<set_type>/<everything:name>')(api_topic_list)
|
|
|
+app.route('/api/v2/topic/<int:num>/<set_type>/<everything:name>')(golang_view())
|
|
|
|
|
|
-app.route('/api/v2/bbs')(api_bbs_list)
|
|
|
-app.route('/api/v2/bbs/main')(api_bbs_exter)
|
|
|
+app.route('/api/v2/bbs')(golang_view())
|
|
|
+app.route('/api/v2/bbs/main')(golang_view())
|
|
|
app.route('/api/v2/bbs/set/<int:bbs_num>/<name>', methods = ['GET', 'PUT'])(api_bbs_w_set)
|
|
|
-app.route('/api/v2/bbs/in/<int:bbs_num>/<int:page>')(api_bbs_exter)
|
|
|
+app.route('/api/v2/bbs/in/<int:bbs_num>/<int:page>')(golang_view())
|
|
|
|
|
|
app.route('/api/v2/bbs/w/<sub_code>', defaults = { 'legacy' : '' })(api_bbs_w)
|
|
|
-app.route('/api/v2/bbs/w/tabom/<sub_code>', methods = ['GET', 'POST'])(api_bbs_w_tabom)
|
|
|
+app.route('/api/v2/bbs/w/tabom/<sub_code>', methods = ['GET', 'POST'])(golang_view())
|
|
|
app.route('/api/v2/bbs/w/comment/<sub_code>/<tool>', defaults = { 'legacy' : '' })(api_bbs_w_comment_exter)
|
|
|
app.route('/api/v2/bbs/w/comment_one/<sub_code>/<tool>', defaults = { 'legacy' : '' })(api_bbs_w_comment_one_exter)
|
|
|
|
|
|
app.route('/api/v2/bbs/w/page_view/<set_id>/<set_code>')(golang_view())
|
|
|
app.route('/api/v2/bbs/w/page_view_post/<set_id>/<set_code>')(golang_view())
|
|
|
|
|
|
-app.route('/api/v2/doc_star_doc/<int:num>/<everything:name>', defaults = { 'do_type' : 'star_doc' })(api_w_watch_list)
|
|
|
-app.route('/api/v2/doc_watch_list/<int:num>/<everything:name>')(api_w_watch_list)
|
|
|
-app.route('/api/v2/set_reset/<everything:name>')(api_w_set_reset)
|
|
|
+app.route('/api/v2/doc_star_doc/<int:num>/<everything:name>', defaults = { 'do_type' : 'star_doc' })(golang_view())
|
|
|
+app.route('/api/v2/doc_watch_list/<int:num>/<everything:name>')(golang_view())
|
|
|
+app.route('/api/v2/set_reset/<everything:name>')(golang_view())
|
|
|
|
|
|
app.route('/api/v2/page_view/<everything:name>')(golang_view())
|
|
|
app.route('/api/v2/page_view_post/<everything:name>')(golang_view())
|
|
|
@@ -963,10 +963,10 @@ app.route('/api/v2/setting/<name>', methods = ['GET', 'PUT'])(api_setting_exter)
|
|
|
|
|
|
app.route('/api/v2/auth')(api_func_auth_exter)
|
|
|
app.route('/api/v2/auth/<user_name>')(api_func_auth_exter)
|
|
|
-app.route('/api/v2/auth/give', methods = ['PATCH'])(api_give_auth)
|
|
|
+app.route('/api/v2/auth/give', methods = ['PATCH'])(golang_view())
|
|
|
|
|
|
-app.route('/api/v2/user/rankup', methods = ['GET', 'PATCH'])(api_user_rankup)
|
|
|
-app.route('/api/v2/user/setting/editor', methods = ['GET', 'POST', 'DELETE'])(api_user_setting_editor)
|
|
|
+app.route('/api/v2/user/rankup', methods = ['GET', 'PATCH'])(golang_view())
|
|
|
+app.route('/api/v2/user/setting/editor', methods = ['GET', 'POST', 'DELETE'])(golang_view())
|
|
|
|
|
|
app.route('/api/v2/ip/<everything:data>', methods = ['GET', 'POST'])(api_func_ip)
|
|
|
app.route('/api/v2/ip_menu/<everything:ip>', defaults = { 'option' : 'user' }, methods = ['GET', 'POST'])(api_func_ip_menu)
|
|
|
@@ -1013,8 +1013,6 @@ app.route('/setting/skin_set', methods = ['POST', 'GET'])(main_setting_skin_set)
|
|
|
app.route('/setting/404_page', methods = ['POST', 'GET'])(main_setting_404_page)
|
|
|
app.route('/setting/email_test', methods = ['POST', 'GET'])(main_setting_email_test)
|
|
|
|
|
|
-app.route('/easter_egg')(main_func_easter_egg)
|
|
|
-
|
|
|
# views -> view
|
|
|
app.route('/view/<path:name>')(main_view)
|
|
|
app.route('/views/<path:name>')(main_view)
|