mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Add show action
This commit is contained in:
parent
0ab9f6333f
commit
b33ad0d4e8
4 changed files with 28 additions and 8 deletions
|
@ -4,12 +4,15 @@ module Api
|
|||
module V1
|
||||
module Registrant
|
||||
class DomainsController < ActionController::API
|
||||
def index
|
||||
render json: { success: true }
|
||||
end
|
||||
|
||||
def show
|
||||
render json: { success: true }
|
||||
@domain = Domain.find_by(uuid: params[:uuid])
|
||||
|
||||
if @domain
|
||||
render json: @domain
|
||||
else
|
||||
render json: { errors: ["Domain not found"] }, status: :not_found
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue