mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-23 17:31:11 +01:00
20 lines
384 B
Python
20 lines
384 B
Python
from app import api
|
|
from routes.base import BaseApi
|
|
|
|
|
|
class NodeApi(BaseApi):
|
|
col_name = 'nodes'
|
|
|
|
arguments = (
|
|
('ip', str),
|
|
('port', int),
|
|
('name', str),
|
|
('description', str),
|
|
)
|
|
|
|
|
|
api.add_resource(NodeApi,
|
|
'/api/nodes',
|
|
'/api/nodes/<string:id>',
|
|
'/api/nodes/<string:id>/<string:action>')
|