def update_message(account_id, message_id, db, secure=True): message = Messages.findOne(db, message_id) if message: message.update(request.json) response.status = 204 else: response.status = 404
def get_message(account_id, message_id, db, secure=True): message = Messages.findOne(db, message_id) if message: return message.JSON() else: response.status = 404 return {}