예제 #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()
예제 #2
0
 def get(self, id):
     comment = Comment.find_by_id(id)
     return comment.json()