Replaced 202s with more suitable 201s
This commit is contained in:
parent
76af0891e9
commit
dac50f1f3a
7 changed files with 10 additions and 10 deletions
|
|
@ -29,7 +29,7 @@ class AutofocusAPI(MicroscopeViewPlugin):
|
|||
task = taskify(self.plugin.autofocus)(dz)
|
||||
|
||||
# return a handle on the autofocus task
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
||||
else:
|
||||
abort(503, "No stage connected. Unable to autofocus.")
|
||||
|
|
@ -50,7 +50,7 @@ class FastAutofocusAPI(MicroscopeViewPlugin):
|
|||
task = taskify(self.plugin.fast_autofocus)(dz, backlash=backlash)
|
||||
|
||||
# return a handle on the autofocus task
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
||||
else:
|
||||
abort(503, "No stage connected. Unable to autofocus.")
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class RecalibrateAPIView(MicroscopeViewPlugin):
|
|||
task = taskify(self.plugin.recalibrate)()
|
||||
|
||||
# Return a handle on the autofocus task
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
||||
|
||||
class Plugin(MicroscopePlugin):
|
||||
|
|
|
|||
|
|
@ -60,4 +60,4 @@ class TileScanAPI(MicroscopeViewPlugin):
|
|||
)
|
||||
|
||||
# return a handle on the scan task
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class LongRunningAPI(MicroscopeViewPlugin):
|
|||
# Attach the long-running method as a microscope task
|
||||
try:
|
||||
task = self.microscope.task.start(self.plugin.long_running, time_to_run)
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
||||
except TaskDeniedException:
|
||||
return abort(409)
|
||||
|
|
@ -94,7 +94,7 @@ class SomeExceptionAPI(MicroscopeViewPlugin):
|
|||
# Attach the long-running method as a microscope task
|
||||
try:
|
||||
task = self.microscope.task.start(self.plugin.some_exception)
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
||||
except TaskDeniedException:
|
||||
return abort(409)
|
||||
|
|
|
|||
|
|
@ -57,4 +57,4 @@ class TaskAPI(MicroscopeViewPlugin):
|
|||
task = taskify(self.plugin.generate_random_numbers_for_a_while)(val_int)
|
||||
|
||||
# return a handle on the autofocus task
|
||||
return jsonify(task.state), 202
|
||||
return jsonify(task.state), 201
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue