@app.post('/feedback')
async def feedback(request: Request):
    'Stores the feedback for a recommended post. Will return a information object on success and an empty object on failure.\n    Think about returning 409-Conflict on failure instead, because the empty object can cause an issue in engine service.'
    vote = request.json['vote']
    config = read_config()
    recommender = Recommender(app.predictor, request['accessor'], config)
    try:
        vote_result = (await recommender.store_feedback(create_vote(vote, config['positive_cutoff'])))
        return json(vote_result)
    except KeyError:
        abort(400, 'Unknown user')
Stores the feedback for a recommended post. Will return a information object on success and an empty object on failure.
Think about returning 409-Conflict on failure instead, because the empty object can cause an issue in engine service.
@app.post('/feedback')
async def feedback(request: Request):
    'Stores the feedback for a recommended post. Will return a information object on success and an empty object on failure.\n    Think about returning 409-Conflict on failure instead, because the empty object can cause an issue in engine service.'
    vote = request.json['vote']
    config = read_config()
    recommender = Recommender(app.predictor, request['accessor'], config)
    try:
        vote_result = (await recommender.store_feedback(create_vote(vote, config['positive_cutoff'])))
        return json(vote_result)
    except KeyError:
        abort(400, 'Unknown user')