File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed
src/main/java/com/example/paul Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -22,5 +22,6 @@ public class constants {
22
22
23
23
public static final String INVALID_TRANSACTION =
24
24
"Account information is invalid or transaction has been denied for your protection. Please try again." ;
25
+ public static final String CREATE_ACCOUNT_FAILED =
26
+ "Error happened during creating new account" ;
25
27
}
26
-
Original file line number Diff line number Diff line change @@ -26,9 +26,6 @@ public class AccountRestController {
26
26
27
27
private static final Logger LOGGER = LoggerFactory .getLogger (AccountRestController .class );
28
28
29
- private static final String CREATE_ACCOUNT_FAILED =
30
- "Error happened during creating new account" ;
31
-
32
29
private final AccountService accountService ;
33
30
34
31
@ Autowired
@@ -77,7 +74,7 @@ public ResponseEntity<?> createAccount(
77
74
78
75
// Return the account details, or warn that no account was found for given input
79
76
if (account == null ) {
80
- return new ResponseEntity <>(CREATE_ACCOUNT_FAILED , HttpStatus .OK );
77
+ return new ResponseEntity <>(constants . CREATE_ACCOUNT_FAILED , HttpStatus .OK );
81
78
} else {
82
79
return new ResponseEntity <>(account , HttpStatus .OK );
83
80
}
Original file line number Diff line number Diff line change 1
1
package com .example .paul .utils ;
2
2
3
- import com .example .paul .constants .constants ;
4
- import com .mifmif .common .regex .Generex ;
5
-
6
3
import javax .validation .constraints .NotBlank ;
7
4
import java .util .Objects ;
8
5
9
- import static com .example .paul .constants .constants .ACCOUNT_NUMBER_PATTERN_STRING ;
10
- import static com .example .paul .constants .constants .SORT_CODE_PATTERN_STRING ;
11
-
12
6
public class CreateAccountInput {
13
7
14
8
@ NotBlank (message = "Bank name is mandatory" )
You can’t perform that action at this time.
0 commit comments