Esempio n. 1
0
 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()
Esempio n. 2
0
 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()
Esempio n. 3
0
 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})
Esempio n. 4
0
 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})
Esempio n. 5
0
 def delete(self, id):
     message = Messages.load(id)
     if message:
         message.organisation_id = None
         message.store()
Esempio n. 6
0
 def delete(self, id):
     message = Messages.load(id)
     if message:
         message.organisation_id = None
         message.store()