Skip to content

Commit

Permalink
#1365 | Fetch Individuals of SubjectType.User as well during sync
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed May 1, 2024
1 parent 055e3b7 commit e1af360
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions packages/openchs-android/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openchs-android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"lodash": "4.17.21",
"moment": "2.29.4",
"native-base": "3.4.9",
"openchs-models": "1.31.62",
"openchs-models": "1.31.66",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-native": "0.72.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class BaseAddressLevelService extends BaseService {
}

getChildrenParent(parentUUID) {
if (_.isNil(parentUUID)) return [];
if (_.isEmpty(parentUUID)) return [];
return [...this.findAllByCriteria(`parentUuid = '${parentUUID}' AND voided = false`, this.getSchema())];
}

Expand Down
3 changes: 2 additions & 1 deletion packages/openchs-android/src/service/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ class SyncService extends BaseService {

async getSyncDetails() {
const url = this.getService(SettingsService).getSettings().serverURL;
const requestParams = "includeUserSubjectType=true"
const entitySyncStatuses = this.entitySyncStatusService.findAll().map(_.identity);
return post(`${url}/v2/syncDetails`, entitySyncStatuses, true)
return post(`${url}/v2/syncDetails?${requestParams}`, entitySyncStatuses, true)
.then(res => res.json())
.then(({syncDetails, nowMinus10Seconds, now}) => ({
syncDetails,
Expand Down

0 comments on commit e1af360

Please sign in to comment.