Skip to content

Commit 623ffb7

Browse files
committed
fix: fix an issue with a client's site regarding his draft/publish feature
1 parent 1689b81 commit 623ffb7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/controllers/maglev/api_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def maglev_theme
3838
@maglev_theme ||= maglev_services.fetch_theme.call
3939
end
4040

41+
def maglev_rendering_mode
42+
params[:rendering_mode] || :editor
43+
end
44+
4145
def record_errors(exception)
4246
render(json: { errors: exception.record.errors }, status: :bad_request)
4347
end

app/services/maglev/get_page_sections.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def fetch_stored_sections(group)
6161
end
6262

6363
def fetch_local_sections(layout_group)
64+
# TODO: potential bug here, why not relying on group['store'] instead of group['id']? what about page related store?
6465
content_group = sections_content.find { |group| group['id'] == layout_group.id }
6566

6667
return [[], 0] if content_group.blank?

0 commit comments

Comments
 (0)