Ejemplo n.º 1
0
 def put(self, id):
     comment = Comment.find_by_id(id)
     data = request.get_json()
     for key in data:
         setattr(comment, key, data[key])
     db.session.commit()
     return comment.json()
Ejemplo n.º 2
0
 def get(self, id):
     comment = Comment.find_by_id(id)
     return comment.json()