()
return res
get marks of the paper with pid
get marks of the paper with pid
get marks of the paper with pid
def mark():
    """ get marks of the paper with pid """
    try:
        pid = long(request.values.get('pid'))
    except Exception:
        return {'status': 'error',
                'reason': 'invalid request'}

    db = get_mongo('paper')
    res = db.find_one({'_id': pid}, {'upvote': 1, 'downvote': 1})
    log_info("Return marks of pdf {0}".format(pid))

    if res is None:
        return {}
    return res
def mark ( ) : try : pid = long ( request . values . get ( 'pid' ) ) except Exception : return { 'status' : 'error' , 'reason' : 'invalid request' } db = get_mongo ( 'paper' ) res = db . find_one ( { '_id' : pid } , { 'upvote' : 1 , 'downvote' : 1 } ) log_info ( "Return marks of pdf {0}" . format ( pid ) ) if res is None : return { } return res