File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 3434#include " ../MainWindow.h"
3535#include " ../AccessClass.h"
3636#include " ../UI/ProcessorList.h"
37+ #include " ../UI/EditorViewport.h"
3738
3839#include " Utils.h"
3940
@@ -852,6 +853,32 @@ class OpenEphysHttpServer : juce::Thread {
852853 }
853854
854855
856+ });
857+
858+ svr_->Get (" /api/undo" , [this ](const httplib::Request& req, httplib::Response& res) {
859+ std::string message_str;
860+ LOGD ( " Received undo request" );
861+
862+ json ret;
863+ res.set_content (ret.dump (), " application/json" );
864+ res.status = 400 ;
865+
866+ const MessageManagerLock mml;
867+ AccessClass::getEditorViewport ()->undo ();
868+
869+ });
870+
871+ svr_->Get (" /api/redo" , [this ](const httplib::Request& req, httplib::Response& res) {
872+ std::string message_str;
873+ LOGD ( " Received redo request" );
874+
875+ json ret;
876+ res.set_content (ret.dump (), " application/json" );
877+ res.status = 400 ;
878+
879+ const MessageManagerLock mml;
880+ AccessClass::getEditorViewport ()->redo ();
881+
855882 });
856883
857884 LOGC (" Beginning HTTP server on port " , PORT);
You can’t perform that action at this time.
0 commit comments