コード例 #1
0
async def put(id: int, work: WorkBaseIn):
    await Work.filter(id=id).update(**work.dict(exclude_unset=True))
    return await WorkBaseOut.from_queryset_single(Work.get(id=id))
コード例 #2
0
async def get(id: int):
    return await WorkBaseOut.from_queryset_single(Work.get(id=id))