init push - laying out the project

This commit is contained in:
Mike Sutton
2022-11-12 02:27:46 +01:00
commit 14e163a1a5
183 changed files with 20069 additions and 0 deletions

View File

@ -0,0 +1,14 @@
class Api::V1::ExchangeAccountsController < Api::AuthenticatedApiController
def update
exchange_account = ExchangeAccount.find(params[:exchange_account_id])
render json: { success: false} and return unless exchange_account
payload = {}
payload[:betting_enabled] = params['canBet'] unless params['canBet'].nil?
payload[:status] = params['isActive'] == true ? 'active' : 'inactive' unless params['isActive'].nil?
exchange_account.update(payload) unless payload.empty?
render json: { success: true} and return
end
end