diff --git a/back/main.py b/back/main.py index 23d3248..62bc357 100644 --- a/back/main.py +++ b/back/main.py @@ -180,8 +180,8 @@ def change_book_status(data: schemas.Book): @app.post("/api/signup") def create_user(data = Body()): if database.query(UserDatabase).filter(UserDatabase.email == data["email"]).first() == None: - new_user = UserDatabase(id=data["id"], email=data["email"], password=data["password"], - hashed_password=get_password_hash(data["password"]), name=data["name"], surname=data["surname"]) + new_user = UserDatabase(email=data["email"], hashed_password=get_password_hash(data["password"]), + name=data["name"], surname=data["surname"]) database.add(new_user) database.commit() database.refresh(new_user) # обновляем состояние объекта