Make search parameter optional for search endpoints
Allow search endpoints to work without the 'search' key in the request body. When no search key is provided, return an empty hash to show all items. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8225340eec
commit
42c811c112
1 changed files with 1 additions and 0 deletions
|
|
@ -280,6 +280,7 @@ module Api
|
|||
|
||||
# Specify whitelisted properties that can be modified.
|
||||
def search_params
|
||||
return {} unless params[:search].present?
|
||||
params.require(:search).permit!
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue