send money moves on settle action

This commit is contained in:
Bilal
2020-10-08 09:44:18 +03:00
parent e25c12c98a
commit 553df2e50d
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ class ChipsController < ApplicationController
name: 'Euro',
symbol: '€',
code: 'EUR',
scale: 3,
scale: 2,
prefixed: false
}
]

View File

@@ -35,7 +35,8 @@ class HomiesController < ApplicationController
homie = Homie.find(homie_id)
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
error_response :bad_request
end