mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Complete auction integration
This commit is contained in:
parent
f1148bd4f4
commit
446b9fbf77
6 changed files with 62 additions and 6 deletions
|
@ -8,12 +8,12 @@ module Api
|
|||
end
|
||||
|
||||
def show
|
||||
auction = Auction.find_by(uuid: params[:uuid])
|
||||
auction = Auction.find_by!(uuid: params[:uuid])
|
||||
render json: serializable_hash(auction)
|
||||
end
|
||||
|
||||
def update
|
||||
auction = Auction.find_by(uuid: params[:uuid])
|
||||
auction = Auction.find_by!(uuid: params[:uuid])
|
||||
|
||||
case params[:status]
|
||||
when Auction.statuses[:awaiting_payment]
|
||||
|
@ -24,6 +24,8 @@ module Api
|
|||
auction.mark_as_payment_received
|
||||
when Auction.statuses[:payment_not_received]
|
||||
auction.mark_as_payment_not_received
|
||||
when Auction.statuses[:domain_not_registered]
|
||||
auction.mark_as_domain_not_registered
|
||||
else
|
||||
raise "Invalid status #{params[:status]}"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue