monkey/monkey_island/cc/resources/edge.py

16 lines
323 B
Python
Raw Normal View History

2017-08-25 22:47:08 +08:00
from flask import request
import flask_restful
2017-08-30 23:14:24 +08:00
from cc.services.edge import EdgeService
2017-08-25 22:47:08 +08:00
__author__ = 'Barak'
class Edge(flask_restful.Resource):
def get(self):
2017-08-30 23:14:24 +08:00
edge_id = request.args.get('id')
if edge_id:
return {"edge": EdgeService.get_displayed_edge_by_id(edge_id)}
2017-08-29 23:41:39 +08:00
2017-08-30 23:14:24 +08:00
return {}