Skip to content
Permalink
Browse files

[WS API] Added getconfig to offer full config.json

  • Loading branch information...
nklerk committed Oct 13, 2019
1 parent f7581a4 commit c08c4fbc7d457ad1a5ce74adb1960246b50c57ca
Showing with 12 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +9 −0 sources/yioapi.cpp
@@ -10,6 +10,9 @@ software/remote/translations/.DS_Store
# Linux build files
software/build-*

# plugins
plugins/*.so

#Translation files
translations/*.ts
translations/*.qm
@@ -232,6 +232,15 @@ void YioAPI::processMessage(QString message)
}
}

if (m_clients[client] == true){
if (type == "getconfig"){
QVariantMap c = getConfig();
QJsonDocument json = QJsonDocument::fromVariant(c);
client->sendTextMessage(json.toJson());
}
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// EMIT MESSAGES OF AUTHENTICATED CLIENTS
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 comments on commit c08c4fb

Please sign in to comment.
You can’t perform that action at this time.