diff --git a/README.md b/README.md index 93812bd..2b41109 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ source venv/bin/activate And then install the development dependencies: ```bash -pip install -r requirements.dev.txt +make install ``` ### Run unit tests diff --git a/fastapi_users_db_beanie/access_token.py b/fastapi_users_db_beanie/access_token.py index 7644ef4..8719484 100644 --- a/fastapi_users_db_beanie/access_token.py +++ b/fastapi_users_db_beanie/access_token.py @@ -13,7 +13,7 @@ class BeanieBaseAccessToken(Generic[ID], Document): user_id: ID created_at: datetime = Field(default_factory=lambda: datetime.now(timezone.utc)) - class Collection: + class Settings: indexes = [IndexModel("token", unique=True)] diff --git a/pyproject.toml b/pyproject.toml index dce6d5a..7bb14ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,8 @@ name = "fastapi_users_db_beanie" [project] name = "fastapi-users-db-beanie" authors = [ - { name = "François Voron", email = "fvoron@gmail.com" } + { name = "François Voron", email = "fvoron@gmail.com" }, + { name = "Schwannden Kuo", email = "schwannden@gmail.com" } ] description = "FastAPI Users database adapter for Beanie" readme = "README.md" @@ -36,7 +37,7 @@ classifiers = [ requires-python = ">=3.7" dependencies = [ "fastapi-users >= 10.0.1", - "beanie >=1.10.8,<1.11", + "beanie >=1.11.0,<1.12", ] [project.optional-dependencies]