mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat : init elements
This commit is contained in:
parent
b1ed0185f9
commit
6a2bea4293
8 changed files with 269 additions and 60 deletions
|
|
@ -23,6 +23,9 @@ class CollectionInDB(Collection):
|
|||
|
||||
#### Classes ####################################################
|
||||
|
||||
####################################################
|
||||
# CRUD
|
||||
####################################################
|
||||
|
||||
async def get_collection(collection_id: str, current_user: PublicUser):
|
||||
await check_database()
|
||||
|
|
@ -112,6 +115,9 @@ async def delete_collection(collection_id: str, current_user: PublicUser):
|
|||
raise HTTPException(
|
||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail="Unavailable database")
|
||||
|
||||
####################################################
|
||||
# Misc
|
||||
####################################################
|
||||
|
||||
async def get_collections(page: int = 1, limit: int = 10):
|
||||
## TODO : auth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue