def post(self):
        args = parser.parse_args()
        session = DataBase.create_session()
        user = User()
        user.name = args["name"]
        user.surname = args["surname"]
        user.email = args["email"]
        user.hashed_password = args["hashed_password"]
        user.salt = args["salt"]
        user.confirmed = args['confirmed']
        user.money = args['money']
        session.add(user)
        session.commit()

        return jsonify({'success': 'OK'})
Beispiel #2
0
 def set_password(user: User, password: str):
     user.hashed_password = generate_password_hash(password)