Update to v1.8.1

close #6
close #8
This commit is contained in:
Lost-MSth
2020-12-09 21:06:27 +08:00
parent 5c02ecdf37
commit 80122d749e
10 changed files with 174 additions and 79 deletions

View File

@@ -470,9 +470,23 @@ def redeem():
# 礼物确认
@app.route('/coffee/12/present/me/claim/<present_id>', methods=['POST'])
def claim_present(present_id):
return jsonify({
"success": True
})
headers = request.headers
token = headers['Authorization']
token = token[7:]
try:
user_id = server.auth.token_get_id(token)
if user_id is not None:
flag = server.arcpurchase.claim_user_present(user_id, present_id)
if flag:
return jsonify({
"success": True
})
else:
return error_return(108)
else:
return error_return(108)
except:
return error_return(108)
# 购买为了world模式boost一下