delete asset

This commit is contained in:
xds
2026-02-06 09:07:03 +03:00
parent 7e2f79aab1
commit 37e69088a1
4 changed files with 20 additions and 0 deletions

View File

@@ -74,3 +74,7 @@ class AssetsRepo:
doc["id"] = str(doc.pop("_id"))
assets.append(Asset(**doc))
return assets
async def delete_asset(self, asset_id: str) -> bool:
res = await self.collection.delete_one({"_id": ObjectId(asset_id)})
return res.deleted_count > 0