mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-03-21 19:56:14 +00:00
Use JSON.pretty_generate when saving json (settings, app cache, and asterisk)
This commit is contained in:
@@ -76,7 +76,7 @@ class W3DHub
|
||||
end
|
||||
|
||||
def save_config(config = @config)
|
||||
File.write(CONFIG_PATH, config.to_json)
|
||||
File.write(CONFIG_PATH, JSON.pretty_generate(config))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -78,7 +78,7 @@ class W3DHub
|
||||
end
|
||||
|
||||
def save_settings
|
||||
File.write(SETTINGS_FILE_PATH, @settings.to_json)
|
||||
File.write(SETTINGS_FILE_PATH, JSON.pretty_generate(@settings))
|
||||
end
|
||||
|
||||
def save_application_cache(json)
|
||||
|
||||
@@ -230,7 +230,7 @@ class W3DHub
|
||||
Api.on_thread(:_applications) do |applications|
|
||||
if applications
|
||||
Store.applications = applications
|
||||
Store.settings.save_application_cache(applications.data.to_json)
|
||||
Store.settings.save_application_cache(JSON.pretty_generate(applications.data))
|
||||
@tasks[:applications][:complete] = true
|
||||
else
|
||||
# FIXME: Failed to retreive!
|
||||
|
||||
Reference in New Issue
Block a user