mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Add account balance REPP
This commit is contained in:
parent
35513b83bf
commit
4a6c1f4166
17 changed files with 111 additions and 27 deletions
16
app/api/repp/account_v1.rb
Normal file
16
app/api/repp/account_v1.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
module Repp
|
||||
class AccountV1 < Grape::API
|
||||
version 'v1', using: :path
|
||||
|
||||
resource :accounts do
|
||||
desc 'Return current cash account balance'
|
||||
|
||||
get 'balance' do
|
||||
@response = {
|
||||
balance: current_user.registrar.cash_account.balance,
|
||||
currency: current_user.registrar.cash_account.currency
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue