Beispiel #1
0
def handle_add_user(json):
    print('add user using: ' + repr(json))
    user = User(**json['data'])
    SS.add(user)
    SS.flush()
    print('user added')
    emit('user_added', {
        'message':
        'user {0} has been added, id: {1}'.format(user.emailAddress,
                                                  user.userId),
        'user':
        User.dump(user),
    },
         broadcast=True)
Beispiel #2
0
def user(user):
    return jsonify(user=User.dump(user))