send money moves on settle action
This commit is contained in:
@@ -22,7 +22,7 @@ class ChipsController < ApplicationController
|
|||||||
name: 'Euro',
|
name: 'Euro',
|
||||||
symbol: '€',
|
symbol: '€',
|
||||||
code: 'EUR',
|
code: 'EUR',
|
||||||
scale: 3,
|
scale: 2,
|
||||||
prefixed: false
|
prefixed: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ class HomiesController < ApplicationController
|
|||||||
homie = Homie.find(homie_id)
|
homie = Homie.find(homie_id)
|
||||||
|
|
||||||
if homie.settle(amount)
|
if homie.settle(amount)
|
||||||
info
|
money_moves = MoneyMove.where(homie_id: params[:homie_id].to_i).all.order(created_at: :desc)
|
||||||
|
json_response money_moves
|
||||||
else
|
else
|
||||||
error_response :bad_request
|
error_response :bad_request
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user