mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Read-Only Configuration-Database support (#1046)
This commit is contained in:
@@ -293,6 +293,7 @@ void JsonAPI::handleSysInfoCommand(const QJsonObject &, const QString &command,
|
||||
hyperion["gitremote"] = QString(HYPERION_GIT_REMOTE);
|
||||
hyperion["time"] = QString(__DATE__ " " __TIME__);
|
||||
hyperion["id"] = _authManager->getID();
|
||||
hyperion["readOnlyMode"] = _hyperion->getReadOnlyMode();
|
||||
|
||||
info["hyperion"] = hyperion;
|
||||
|
||||
@@ -875,8 +876,14 @@ void JsonAPI::handleConfigSetCommand(const QJsonObject &message, const QString &
|
||||
QJsonObject config = message["config"].toObject();
|
||||
if (API::isHyperionEnabled())
|
||||
{
|
||||
API::saveSettings(config);
|
||||
sendSuccessReply(command, tan);
|
||||
if ( API::saveSettings(config) )
|
||||
{
|
||||
sendSuccessReply(command, tan);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendErrorReply("Save settings failed", command, tan);
|
||||
}
|
||||
}
|
||||
else
|
||||
sendErrorReply("Saving configuration while Hyperion is disabled isn't possible", command, tan);
|
||||
|
Reference in New Issue
Block a user