WebAPI: Change delimiter from string to char in preferences API

This commit is contained in:
Sepro 2020-04-21 09:11:16 +02:00
parent a3b58e59da
commit 98bb63b390

View file

@ -165,7 +165,7 @@ void AppController::preferencesAction()
data["ip_filter_enabled"] = session->isIPFilteringEnabled();
data["ip_filter_path"] = Utils::Fs::toNativePath(session->IPFilterFile());
data["ip_filter_trackers"] = session->isTrackerFilteringEnabled();
data["banned_IPs"] = session->bannedIPs().join("\n");
data["banned_IPs"] = session->bannedIPs().join('\n');
// Speed
// Global Rate Limits
@ -231,7 +231,7 @@ void AppController::preferencesAction()
QStringList authSubnetWhitelistStringList;
for (const Utils::Net::Subnet &subnet : asConst(pref->getWebUiAuthSubnetWhitelist()))
authSubnetWhitelistStringList << Utils::Net::subnetToString(subnet);
data["bypass_auth_subnet_whitelist"] = authSubnetWhitelistStringList.join("\n");
data["bypass_auth_subnet_whitelist"] = authSubnetWhitelistStringList.join('\n');
data["web_ui_max_auth_fail_count"] = pref->getWebUIMaxAuthFailCount();
data["web_ui_ban_duration"] = static_cast<int>(pref->getWebUIBanDuration().count());
data["web_ui_session_timeout"] = pref->getWebUISessionTimeout();