diff --git a/src/server/WebBackend.cpp b/src/server/WebBackend.cpp index 76bd0f4..f618e3e 100644 --- a/src/server/WebBackend.cpp +++ b/src/server/WebBackend.cpp @@ -142,26 +142,32 @@ RestOutputStruct::ExitCode WebSocket::EvaluateDispatcherRequest(bool allaccess, QString act = in_args.toObject().value("action").toString().toLower(); //Determing the type of action to perform - if(act=="run"){ } - if(!allaccess){ - return RestOutputStruct::FORBIDDEN; //this user does not have permission to queue jobs + if(act=="run"){ + if(!allaccess){ return RestOutputStruct::FORBIDDEN; } //this user does not have permission to queue jobs + QStringList ids = in_args.toObject().keys(); + ids.removeAll("action"); //already handled the action + for(int i=0; iqueueProcess(ids[i], cmds); + } + //Return the PENDING result + out->insert("started", QJsonArray::fromStringList(ids)); + //}else if(act=="read"){ + + }else{ + return RestOutputStruct::BADREQUEST; } - - - //Parse the input arguments structure - /*if(in_args.isArray()){ in_req = JsonArrayToStringList(in_args.toArray()); } - else if(in_args.isObject()){ - QStringList keys = in_args.toObject().keys(); - for(int i=0; iinsert(in_req[i],values[i]); }*/ //Return Success return RestOutputStruct::OK; }