Beispiel #1
0
def add_comment():
    com = Comment(**request.get_json())
    com.save()
    return jsonify(**com.to_dict()), 201
Beispiel #2
0
def add_comment():
    com = Comment(**request.get_json())
    com.save()
    return jsonify(**com.to_dict()), 201
Beispiel #3
0
def get_all_comments(website, page):
    coms = Comment.objects(website=website, page=page)
    return jsonify(comments=[com.to_dict() for com in coms])
Beispiel #4
0
def get_all_comments(website, page):
    coms = Comment.objects(website=website, page=page)
    return jsonify(comments=[com.to_dict() for com in coms])