Commit 69c0f51a authored by fred's avatar fred
Browse files

send new ftp user to nodeftp service

parent 182006a5
......@@ -884,7 +884,7 @@ void Http_admin::admin_user_post(QxtWebRequestEvent* event)
if (ftp) {
QString command = "{\"email\": \"" + form_field["email"] + "\", \"password\": \"" + str_ftp_token + "\", \"path\": \"" + str_ftp_directory + "\"}";
emit create_ftp_user("ftp", command);
emit create_ftp_user("nodeftp", command);
qDebug() << "EMIT CREATE FTP USER : " << command;
}
......@@ -1469,12 +1469,13 @@ void Http_admin::admin_workflow_post(QxtWebRequestEvent* event)
QUrl worker = QUrl::fromPercentEncoding(form_field["workers"].toAscii().replace("+", "%20"));
qDebug() << "URL : " << worker.toString();
string json = worker.toString().toStdString();
std::cout << "WORKFLOW JSON : " << json << std::endl;
BSONObj b_workflow;
mongo::BSONObj b_workflow;
try
{
b_workflow = mongo::fromjson(worker.toString().toStdString());
b_workflow = mongo::fromjson(json);
}
catch (mongo::MsgAssertionException &e)
{
......@@ -1484,7 +1485,7 @@ void Http_admin::admin_workflow_post(QxtWebRequestEvent* event)
postEvent(redir);
return;
}
std::cout << "WORKFLOW : " << b_workflow.toString() << std::endl;
std::cout << "WORKFLOW : " << b_workflow.toString() << std::endl;
BSONObj user_id;
if (!user_bson[event->cookies.value("nodecast")].getBoolField("admin"))
......
......@@ -357,7 +357,7 @@ void Api_payload::receive_http_payload()
break;
}
}
if (!node_found) bodyMessage = buildResponse("error", "node", "unknown");
//if (!node_found) {bodyMessage = buildResponse("error", "node", "unknown");}
}
}
......@@ -1014,7 +1014,7 @@ void Api_user::receive_http_payload()
if (ftp) {
QString command = "{\"email\": \"" + QString::fromStdString(b_user.getField("email").str()) + "\", \"password\": \"" + str_ftp_token + "\", \"path\": \"" + str_ftp_directory + "\"}";
emit create_ftp_user("ftp", command);
emit create_ftp_user("nodeftp", command);
qDebug() << "EMIT CREATE FTP USER";
}
bodyMessage = buildResponse("token", str_token);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment