Skip to content

Commit b657f40

Browse files
committed
Convert Long to String for Mobile number to match with registry data type
1 parent 2e429c9 commit b657f40

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hcx-apis/src/main/java/org/swasth/hcx/controllers/v1/UserController.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public ResponseEntity<Object> create(@RequestHeader HttpHeaders header, @Request
3535
if(requestBody.containsKey(EMAIL)) {
3636
requestBody.put(EMAIL,requestBody.get(EMAIL).toString().toLowerCase());
3737
}
38+
if(requestBody.containsKey(MOBILE)) {
39+
Object mobileValue = requestBody.get(MOBILE);
40+
if (!(mobileValue instanceof String)) {
41+
requestBody.put(MOBILE, mobileValue.toString());
42+
}
43+
}
3844
List<Map<String,Object>> tenantRoleList = (List<Map<String, Object>>) requestBody.getOrDefault(TENANT_ROLES,"");
3945
for(Map<String,Object> tenant : tenantRoleList){
4046
userService.authorizeToken(header,(String) tenant.getOrDefault(PARTICIPANT_CODE,""));

0 commit comments

Comments
 (0)