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 6
6
import com .jongsoft .finance .providers .AccountProvider ;
7
7
import com .jongsoft .finance .rest .ApiDefaults ;
8
8
import com .jongsoft .finance .rest .model .AccountResponse ;
9
- import com .jongsoft .finance .security .CurrentUserProvider ;
10
9
import io .micronaut .http .annotation .*;
11
10
import io .micronaut .security .annotation .Secured ;
12
11
import io .micronaut .security .rules .SecurityRule ;
@@ -199,13 +198,13 @@ AccountResponse adjustSavingGoal(
199
198
AccountResponse reservationForSavingGoal (
200
199
@ PathVariable long accountId ,
201
200
@ PathVariable long savingId ,
202
- @ Valid @ QueryValue @ Positive BigDecimal amount ) {
201
+ @ Valid @ QueryValue @ Positive double amount ) {
203
202
accountProvider .lookup (accountId )
204
203
.ifPresent (account ->
205
204
account .getSavingGoals ()
206
205
.filter (goal -> goal .getId () == savingId )
207
206
.head ()
208
- .registerPayment (amount ))
207
+ .registerPayment (BigDecimal . valueOf ( amount ) ))
209
208
.elseThrow (() -> StatusException .notFound ("No account found for id " + accountId ));
210
209
211
210
return accountProvider .lookup (accountId )
You can’t perform that action at this time.
0 commit comments