@app.post('/todoer/api/v1/tasks', status_code=201, response_model=Task)
async def create_task(task: TaskCreate, database=Depends(get_database)) -> Task:
    try:
        logger.info(f'request to create task in project {task.project}')
        added_task = (await database.add(task))
        return added_task
    except DataLayerException:
        raise HTTPException(status_code=409, detail=f'Adding task key {task.key} failed, already exists')
@app.post('/todoer/api/v1/tasks', status_code=201, response_model=Task)
async def create_task(task: TaskCreate, database=Depends(get_database)) -> Task:
    try:
        logger.info(f'request to create task in project {task.project}')
        added_task = (await database.add(task))
        return added_task
    except DataLayerException:
        raise HTTPException(status_code=409, detail=f'Adding task key {task.key} failed, already exists')