def like(self, id): message = Messages.load(id) if message: message.like.append(user_id=current_user.id, \ displayname=current_user.displayname, \ organisation_id=current_user.organisation_id, \ is_like = 1) message.store()
def comment(self, id): content=request.form['comment'] message = Messages.load(id) message.comments.append(user_id=current_user.id, \ organisation_id=current_user.organisation_id, \ displayname=current_user.displayname, \ content=content) message.store() return jsonify({'response' : True})
def comment(self, id): content = request.form['comment'] message = Messages.load(id) message.comments.append(user_id=current_user.id, \ organisation_id=current_user.organisation_id, \ displayname=current_user.displayname, \ content=content) message.store() return jsonify({'response': True})
def delete(self, id): message = Messages.load(id) if message: message.organisation_id = None message.store()