|
@@ -16,6 +16,7 @@ import ast
|
|
from gevent.pywsgi import WSGIServer
|
|
from gevent.pywsgi import WSGIServer
|
|
from multiprocessing import cpu_count, Process
|
|
from multiprocessing import cpu_count, Process
|
|
from utils import update_video_w_h_rate
|
|
from utils import update_video_w_h_rate
|
|
|
|
+from user2new import user2new
|
|
# from werkzeug.middleware.profiler import ProfilerMiddleware
|
|
# from werkzeug.middleware.profiler import ProfilerMiddleware
|
|
|
|
|
|
|
|
|
|
@@ -154,6 +155,25 @@ def update_rov():
|
|
return json.dumps(result)
|
|
return json.dumps(result)
|
|
|
|
|
|
|
|
|
|
|
|
+# 管理后台指定用户恢复成新用户
|
|
|
|
+@app.route('/applet/user/to_new', methods=['GET', 'POST'])
|
|
|
|
+def user_to_new():
|
|
|
|
+ try:
|
|
|
|
+ request_data = json.loads(request.get_data())
|
|
|
|
+ log_.info({'requestUri': '/applet/user/to_new', 'requestData': request_data})
|
|
|
|
+ app_type = request_data.get('appType')
|
|
|
|
+ mid = request_data.get('mid')
|
|
|
|
+ uid = request_data.get('uid')
|
|
|
|
+ user2new(app_type=app_type, mid=mid, uid=uid)
|
|
|
|
+ result = {'code': 200, 'message': 'success'}
|
|
|
|
+ log_.info({'requestUri': '/applet/user/to_new', 'result': result})
|
|
|
|
+ return json.dumps(result)
|
|
|
|
+ except Exception as e:
|
|
|
|
+ log_.error(traceback.format_exc())
|
|
|
|
+ result = {'code': -1, 'message': 'fail'}
|
|
|
|
+ return json.dumps(result)
|
|
|
|
+
|
|
|
|
+
|
|
# app热榜
|
|
# app热榜
|
|
@app.route('/app/video/hot_list', methods=['GET', 'POST'])
|
|
@app.route('/app/video/hot_list', methods=['GET', 'POST'])
|
|
def app_video_hot_list():
|
|
def app_video_hot_list():
|