diff --git a/extensions/users.py b/extensions/users.py index 393be62..5be5905 100644 --- a/extensions/users.py +++ b/extensions/users.py @@ -50,7 +50,7 @@ if configGet("registration_requires_confirmation") is True: if configGet("registration_enabled") is True: @app.post("/users") - async def user_create(user: str, email: str, password: str): + async def user_create(user: str = Form(), email: str = Form(), password: str = Form()): if col_users.find_one( {"user": user} ) is not None: return HTTPException(HTTP_406_NOT_ACCEPTABLE, detail=configGet("user_already_exists", "messages")) col_users.insert_one( {"user": user, "email": email, "hash": get_password_hash(password), "disabled": configGet("registration_requires_confirmation")} )