File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
fintrack-api/src/main/java/com/jongsoft/finance/rest/account Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 66import com .jongsoft .finance .providers .AccountProvider ;
77import com .jongsoft .finance .rest .ApiDefaults ;
88import com .jongsoft .finance .rest .model .AccountResponse ;
9- import com .jongsoft .finance .security .CurrentUserProvider ;
109import io .micronaut .http .annotation .*;
1110import io .micronaut .security .annotation .Secured ;
1211import io .micronaut .security .rules .SecurityRule ;
@@ -199,13 +198,13 @@ AccountResponse adjustSavingGoal(
199198 AccountResponse reservationForSavingGoal (
200199 @ PathVariable long accountId ,
201200 @ PathVariable long savingId ,
202- @ Valid @ QueryValue @ Positive BigDecimal amount ) {
201+ @ Valid @ QueryValue @ Positive double amount ) {
203202 accountProvider .lookup (accountId )
204203 .ifPresent (account ->
205204 account .getSavingGoals ()
206205 .filter (goal -> goal .getId () == savingId )
207206 .head ()
208- .registerPayment (amount ))
207+ .registerPayment (BigDecimal . valueOf ( amount ) ))
209208 .elseThrow (() -> StatusException .notFound ("No account found for id " + accountId ));
210209
211210 return accountProvider .lookup (accountId )
You can’t perform that action at this time.
0 commit comments