2021-01-15 19:28:52 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Api::V1::ExpensesController < EmptyController
|
|
|
|
|
|
|
|
def show
|
2021-01-16 19:38:01 +00:00
|
|
|
amount = 0
|
2021-01-16 18:52:11 +00:00
|
|
|
Redis.current.with do |conn|
|
|
|
|
amount = conn.get("monthly_funding_amount") || 0
|
|
|
|
end
|
2021-01-15 19:28:52 +00:00
|
|
|
amount = [amount.to_f, 100].min
|
|
|
|
render json: { "expenses": amount }
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|