def update_payload(data): log("socketio:update_payload", "req received") resp = payload.update_payload(payload_id=data.get('PayloadId'), enabled=False, visible=False) emit('payloadUpdated', resp, broadcast=True)
def delete(self, payload_id): results = payload.update_payload(payload_id, enabled=False, visible=False) if not results['Success']: response_code = 400 else: response_code = 200 return jsonify(results, response_code)
def put(self, payload_id): args = payload_parser.parse_args() return jsonify( payload.update_payload(payload_id=payload_id, jitter=args.get('Jitter'), interval=args.get('BeaconInterval'), expiration_date=args.get('ExpirationDate'), enabled=args.get('Enabled'), visible=args.get('Visible')))
def update_payload(data): log("socketio:update_payload", "req received") print(data) resp = payload.update_payload(payload_id=data.get('Id'), jitter=data.get("Jitter"), interval=data.get("Interval"), enabled=data.get("Enabled"), visible=data.get("Visible")) print(resp) emit('payloadUpdated', resp, broadcast=True)