mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-08 08:47:32 +08:00
[Enhance] Account Endpoints
- Adapt to new account registration and login endpoints. - For Arcaea 6.3.2
This commit is contained in:
@@ -14,8 +14,11 @@ from .func import arc_try, header_check, success_return
|
||||
|
||||
bp = Blueprint('user', __name__, url_prefix='/user')
|
||||
|
||||
bp2 = Blueprint('account', __name__, url_prefix='/account')
|
||||
|
||||
|
||||
@bp.route('', methods=['POST']) # 注册接口
|
||||
@bp2.route('', methods=['POST'])
|
||||
@arc_try
|
||||
def register():
|
||||
error = header_check(request)
|
||||
@@ -173,6 +176,7 @@ def sys_set(user_id, set_arg):
|
||||
|
||||
|
||||
@bp.route('/me/request_delete', methods=['POST']) # 删除账号
|
||||
@bp2.route('/me/request_delete', methods=['POST'])
|
||||
@auth_required(request)
|
||||
@arc_try
|
||||
def user_delete(user_id):
|
||||
@@ -183,6 +187,14 @@ def user_delete(user_id):
|
||||
|
||||
|
||||
@bp.route('/email/resend_verify', methods=['POST']) # 邮箱验证重发
|
||||
@bp2.route('/email/resend_verify', methods=['POST'])
|
||||
@arc_try
|
||||
def email_resend_verify():
|
||||
raise ArcError('Email verification unavailable.', 151, status=404)
|
||||
|
||||
|
||||
@bp.route('/verify', methods=['POST']) # 邮箱验证状态查询
|
||||
@bp2.route('/verify', methods=['POST'])
|
||||
@arc_try
|
||||
def email_verify():
|
||||
raise ArcError('Email verification unavailable.', 151, status=404)
|
||||
|
||||
Reference in New Issue
Block a user