15 lines
335 B
Python
15 lines
335 B
Python
from motor.motor_asyncio import AsyncIOMotorDatabase
|
|
|
|
import schemas
|
|
from crud.base import CRUDBase
|
|
|
|
__all__ = 'api_log',
|
|
|
|
|
|
class CRUDApiLog(CRUDBase):
|
|
async def insert_log(self, db: AsyncIOMotorDatabase, data_in: schemas.ApiLogInsert):
|
|
await db[self.coll_name].insert_one(data_in.dict())
|
|
|
|
|
|
api_log = CRUDApiLog('api_log')
|