diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-01 15:16:34 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:47:21 +0200 |
| commit | 7f27a6370a0af25e1bf6ff8f46360c6c26c21e0b (patch) | |
| tree | c146f1816322ae809b0ca419dc55db4583baa922 /web-server/opendc/api/v2/experiments/experimentId/endpoint.py | |
| parent | 586d1c723dbae95424b076f26da88fcd227f2f42 (diff) | |
Restrict PUT
Diffstat (limited to 'web-server/opendc/api/v2/experiments/experimentId/endpoint.py')
| -rw-r--r-- | web-server/opendc/api/v2/experiments/experimentId/endpoint.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/web-server/opendc/api/v2/experiments/experimentId/endpoint.py b/web-server/opendc/api/v2/experiments/experimentId/endpoint.py index 5120368e..1611f889 100644 --- a/web-server/opendc/api/v2/experiments/experimentId/endpoint.py +++ b/web-server/opendc/api/v2/experiments/experimentId/endpoint.py @@ -17,14 +17,11 @@ def GET(request): def PUT(request): - """Update this Experiment.""" + """Update this Experiments name.""" request.check_required_parameters(path={'experimentId': 'string'}, body={ 'experiment': { - 'topologyId': 'string', - 'traceId': 'string', - 'schedulerName': 'string', 'name': 'string', } }) @@ -34,14 +31,11 @@ def PUT(request): experiment.check_exists() experiment.check_user_access(request.google_id, True) - experiment.set_property('topologyId', request.params_body['experiment']['topologyId']) - experiment.set_property('traceId', request.params_body['experiment']['traceId']) - experiment.set_property('schedulerName', request.params_body['experiment']['schedulerName']) experiment.set_property('name', request.params_body['experiment']['name']) experiment.update() - return Response(200, 'Successfully updated experiment', experiment.obj) + return Response(200, 'Successfully updated experiment.', experiment.obj) def DELETE(request): |
