Skip to content

Commit

Permalink
Merge pull request #426 from bcgov/feature/addAuthSessionIndexes
Browse files Browse the repository at this point in the history
Add indexes
  • Loading branch information
esune authored Mar 5, 2024
2 parents 9d8b9f4 + 97e495d commit 30c54bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oidc-controller/api/db/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ async def init_db():
client_configs = db.get_collection(COLLECTION_NAMES.CLIENT_CONFIGURATIONS)
client_configs.create_index([("client_id", ASCENDING)], unique=True)

auth_session = db.get_collection(COLLECTION_NAMES.AUTH_SESSION)
auth_session.create_index([("pres_exch_id", ASCENDING)], unique=True)
auth_session.create_index([("pyop_auth_code", ASCENDING)], unique=True)

async def get_db():
return client[settings.DB_NAME]

0 comments on commit 30c54bd

Please sign in to comment.