Skip to content

Commit

Permalink
Solara
Browse files Browse the repository at this point in the history
  • Loading branch information
IdeaS0ft committed Sep 5, 2024
1 parent 09aabfd commit 9a8ce70
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions solara/lib/core/dashboard/handler/edit_section_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def mount
key = request_payload['key']
data = request_payload['data']


update_section(key, data, brand_key)
set_current_brand_content_changed(brand_key, true)

Expand All @@ -33,7 +32,7 @@ def update_section(key, data, brand_key)

path = template[:path]
if File.exist?(path)
if path.include?('theme.json')
if key == 'theme'
update_theme(path, data)
else
File.write(path, JSON.pretty_generate(data))
Expand All @@ -47,7 +46,6 @@ def update_section(key, data, brand_key)
raise
end

# TODO: This workround should be improved
def update_theme(path, data)
json = JSON.parse(File.read(path))
json['colors'] = data
Expand Down

0 comments on commit 9a8ce70

Please sign in to comment.