@app.post('/content')
async def content(request: Request):
    '\n    Inserts posts into the database. The request needs the format\n    { "posts": [{"id": string, "tags": string}]}.\n    Returns the amout of inserted items and 200-OK.\n        '
    filtered_posts = [(post['id'], post['tags']) for post in request.json['posts']]
    inserted = (await request['accessor'].add_content(filtered_posts))
    if (inserted > 0):
        ensure_future(retrain(app, app.loop))
    return json({'inserted_count': inserted})
Inserts posts into the database. The request needs the format
{ "posts": [{"id": string, "tags": string}]}.
Returns the amout of inserted items and 200-OK.
@app.post('/content')
async def content(request: Request):
    '\n    Inserts posts into the database. The request needs the format\n    { "posts": [{"id": string, "tags": string}]}.\n    Returns the amout of inserted items and 200-OK.\n        '
    filtered_posts = [(post['id'], post['tags']) for post in request.json['posts']]
    inserted = (await request['accessor'].add_content(filtered_posts))
    if (inserted > 0):
        ensure_future(retrain(app, app.loop))
    return json({'inserted_count': inserted})