склади и инструмент готовы
This commit is contained in:
@@ -77,6 +77,11 @@ class ToolboxHandler:
|
||||
toolboxes = await CRUD.read(query, True)
|
||||
return [toolbox.toDict() for toolbox in toolboxes] if toolboxes else []
|
||||
|
||||
async def getIdByOwner(ownerId: int) -> int:
|
||||
query = select(Toolbox).where(Toolbox.owner_id == ownerId)
|
||||
toolbox = await CRUD.read(query)
|
||||
return toolbox.id
|
||||
|
||||
async def delete(toolboxId: int, user_id: int = None):
|
||||
query = select(Toolbox).where(Toolbox.id == toolboxId)
|
||||
toolbox = await CRUD.read(query)
|
||||
|
||||
Reference in New Issue
Block a user