mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 11:11:11 +02:00
18869472-archive_changes
This commit is contained in:
parent
f77e599e2f
commit
d3ad01f1a2
4 changed files with 85 additions and 4 deletions
|
@ -22,7 +22,12 @@ class Admin::DomainVersionsController < AdminController
|
|||
|
||||
search_params.each do |key, value|
|
||||
next if value.empty?
|
||||
whereS += create_where_string(key, value)
|
||||
case key
|
||||
when 'event'
|
||||
whereS += " AND event = '#{value}'"
|
||||
else
|
||||
whereS += create_where_string(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
whereS += " AND object->>'registrant_id' ~ '#{registrant.id}'" if registrant
|
||||
|
@ -36,6 +41,10 @@ class Admin::DomainVersionsController < AdminController
|
|||
|
||||
end
|
||||
|
||||
def show
|
||||
@version = DomainVersion.find(params[:id])
|
||||
end
|
||||
|
||||
def search
|
||||
render json: DomainVersion.search_by_query(params[:q])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue