Ejemplo n.º 1
0
def create_user():
    auth_user = request.headers.get('auth_user')

    user = DAO.find(User, email=auth_user)
    if user is None:
        user = User()
        user.email = auth_user
        DAO.create(user)
    return "Ok"
Ejemplo n.º 2
0
def create_game(game):
    auth_user = request.headers['auth_user']
    user = DAO.find(User, email=auth_user)
    game.user = user
    DAO.create(game)
    return "Ok"
Ejemplo n.º 3
0
def create_character(game_character):
    DAO.create(game_character)
    return "Ok"