We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c0ca9ed + 3b0564a commit 41254eaCopy full SHA for 41254ea
1 file changed
Source/Utils/OpenEphysHttpServer.h
@@ -517,11 +517,19 @@ class OpenEphysHttpServer : juce::Thread {
517
518
svr_->Get("/api/processors/clear", [this](const httplib::Request&, httplib::Response& res) {
519
520
- const MessageManagerLock mml;
+ String return_msg;
521
+
522
+ if (!CoreServices::getAcquisitionStatus())
523
+ {
524
+ const MessageManagerLock mml;
525
+ graph_->clearSignalChain();
526
+ return_msg = "Signal chain cleared successfully.";
527
+ } else {
528
+ return_msg = "Cannot clear signal chain while acquisition is active!";
529
+ }
530
- graph_->clearSignalChain();
531
json ret;
- status_to_json(graph_, &ret);
532
+ ret["info"] = return_msg.toStdString();
533
res.set_content(ret.dump(), "application/json");
534
});
535
0 commit comments