@app.put('/todoer/api/v1/tasks/{task_key}', response_model=Task)
async def update_task(task_key: str, task: TaskUpdate, database=Depends(get_database)) -> Task:
    try:
        logger.info(f'request to update task: {task_key}')
        udp_task = (await database.update(task_key, task))
        return udp_task
    except DataLayerException:
        raise HTTPException(status_code=404, detail=f'Task {task_key} not found')
@app.put('/todoer/api/v1/tasks/{task_key}', response_model=Task)
async def update_task(task_key: str, task: TaskUpdate, database=Depends(get_database)) -> Task:
    try:
        logger.info(f'request to update task: {task_key}')
        udp_task = (await database.update(task_key, task))
        return udp_task
    except DataLayerException:
        raise HTTPException(status_code=404, detail=f'Task {task_key} not found')