monkey/monkey_island/cc/resources/node.py

18 lines
366 B
Python
Raw Normal View History

2017-08-30 23:14:24 +08:00
from flask import request
import flask_restful
2018-02-22 22:21:03 +08:00
from cc.auth import jwt_required
2017-08-30 23:14:24 +08:00
from cc.services.node import NodeService
__author__ = 'Barak'
class Node(flask_restful.Resource):
2018-02-22 22:21:03 +08:00
@jwt_required()
2017-08-30 23:14:24 +08:00
def get(self):
node_id = request.args.get('id')
if node_id:
2017-08-31 16:03:31 +08:00
return NodeService.get_displayed_node_by_id(node_id)
2017-08-30 23:14:24 +08:00
return {}