[Enhance] Skill of Mithra

- Add support for the skill of Mithra
This commit is contained in:
Lost-MSth
2023-03-23 23:17:02 +08:00
parent 1672d337ff
commit f92d8a9642
14 changed files with 86 additions and 35 deletions

View File

@@ -36,6 +36,12 @@ def login():
return jsonify({"success": True, "token_type": "Bearer", 'user_id': user.user_id, 'access_token': user.token})
@bp.route('/verify', methods=['POST']) # 邮箱验证进度查询
@arc_try
def email_verify():
raise ArcError('Email verification unavailable.', 151, status=404)
def auth_required(req):
# arcaea登录验证写成了修饰器
def decorator(view):

View File

@@ -40,6 +40,8 @@ def error_return(e: ArcError = default_error): # 错误返回
# 124 你今天不能再使用这个IP地址创建新的账号
# 150 非常抱歉您已被限制使用此功能
# 151 目前无法使用此功能
# 160 账户未邮箱认证,请检查邮箱
# 161 账户认证过期,请重新注册
# 401 用户不存在
# 403 无法连接至服务器
# 501 502 -6 此物品目前无法获取
@@ -51,6 +53,7 @@ def error_return(e: ArcError = default_error): # 错误返回
# 604 你不能加自己为好友
# 903 下载量超过了限制请24小时后重试
# 905 请在再次使用此功能前等待24小时
# 910 重新请求验证邮件前需等待x分钟 extra: retry_at
# 1001 设备数量达到上限
# 1002 此设备已使用过此功能
# 1201 房间已满

View File

@@ -95,6 +95,8 @@ def song_score_post(user_id):
request.form['miss_count'], request.form['health'], request.form['modifier'], int(time() * 1000), request.form['clear_type'])
x.beyond_gauge = int(request.form['beyond_gauge'])
x.submission_hash = request.form['submission_hash']
if 'combo_interval_bonus' in request.form:
x.combo_interval_bonus = int(request.form['combo_interval_bonus'])
if not x.is_valid:
raise InputError('Invalid score.', 107)
x.upload_score()

View File

@@ -164,3 +164,9 @@ def sys_set(user_id, set_arg):
@arc_try
def user_delete(user_id):
raise ArcError('Cannot delete the account.', 151, status=404)
@bp.route('/email/resend_verify', methods=['POST']) # 邮箱验证重发
@arc_try
def email_resend_verify():
raise ArcError('Email verification unavailable.', 151, status=404)