mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Minor improvements to SidebarSectionsController spec (#21734)
1. '#reorder' specs where serializing objects when it is not needed. 2. Add tests for anon user to `#reorder` specs
This commit is contained in:
committed by
GitHub
parent
038318bffc
commit
e8b138e24f
@@ -85,7 +85,7 @@ class SidebarSectionsController < ApplicationController
|
||||
order = reorder_params["links_order"].map(&:to_i).each_with_index.to_h
|
||||
set_order(sidebar_section, order)
|
||||
|
||||
render_serialized_sidebar_section(sidebar_section)
|
||||
render_serialized(sidebar_section, SidebarSectionSerializer)
|
||||
rescue Discourse::InvalidAccess
|
||||
render json: failed_json, status: 403
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user