コード例 #1
0
async def create_cast(payload: CastIn):
    cast_id = await service.create_cast(payload)

    response = {'id': cast_id, **payload.dict()}

    debug(response)
    return response
コード例 #2
0
async def create_cast(payload: CastIn):
    cast_id = await db_manager.add_cast(payload)

    response = {
        'id': cast_id,
        **payload.dict()
    }

    return response
コード例 #3
0
async def post(payload: CastIn):
    query = casts.insert().values(**payload.dict())
    return await database.execute(query=query)