Initial commit
This commit is contained in:
43
app/api/v2/account/treasury.rb
Normal file
43
app/api/v2/account/treasury.rb
Normal file
@@ -0,0 +1,43 @@
|
||||
# encoding: UTF-8
|
||||
# frozen_string_literal: true
|
||||
|
||||
module API
|
||||
module V2
|
||||
module Account
|
||||
class Treasury < Grape::API
|
||||
|
||||
helpers ::API::V2::ParamHelpers
|
||||
|
||||
desc 'Get list of user cards',
|
||||
is_array: true
|
||||
params do
|
||||
# use :pagination
|
||||
optional :uid,
|
||||
type: String,
|
||||
default: false,
|
||||
desc: 'UID of user'
|
||||
end
|
||||
get '/treasury/cards' do
|
||||
user_authorize! :read, ::Operations::Account
|
||||
|
||||
present current_user.cards
|
||||
end
|
||||
|
||||
desc 'Get list of user ibans',
|
||||
is_array: true
|
||||
params do
|
||||
# use :pagination
|
||||
optional :uid,
|
||||
type: String,
|
||||
default: false,
|
||||
desc: 'UID of user'
|
||||
end
|
||||
get '/treasury/ibans' do
|
||||
user_authorize! :read, ::Operations::Account
|
||||
|
||||
present current_user.ibans
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user