Exemple #1
0
def uploadPlayerAvatar(request):
    if request.method == 'POST':
        data = request.FILES
        data['upfiletype'] = 'player'
        data['id'] = request.POST.get('player_id', None)
        _ret = uploadImage(data)
        if _ret['status'] == 'ok':
            updateUserInfo({'user_id':data['id'], 'avatar':_ret['result']['url']})
        return process_ret_status(_ret)
    return json_response(failed_response("操作不支持"))
Exemple #2
0
def updateUser(request):
    if request.method == 'POST':
        _ret = updateUserInfo(request.POST)
        return process_ret_status(_ret)
    return json_response(failed_response("操作不支持"))