Chore: API Improvements (#3469)

This commit is contained in:
Sojan Jose
2021-11-27 00:48:46 +05:30
committed by GitHub
parent 55843c5bad
commit add004a56e
13 changed files with 55 additions and 13 deletions

View File

@@ -33,7 +33,7 @@ class Api::V1::Accounts::CannedResponsesController < Api::V1::Accounts::BaseCont
def canned_responses
if params[:search]
Current.account.canned_responses.where('short_code ILIKE ?', "#{params[:search]}%")
Current.account.canned_responses.where('short_code ILIKE :search OR content ILIKE :search', search: "%#{params[:search]}%")
else
Current.account.canned_responses
end