Skip to content

Commit

Permalink
(fix) No need to update location when updating locale (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher authored Mar 31, 2023
1 parent 839d51d commit 05394ee
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {
openmrsFetch,
queueSynchronizationItemFor,
getSessionLocation,
setSessionLocation,
} from "@openmrs/esm-framework/src/internal";
import { userPropertyChange } from "../../constants";

Expand All @@ -17,19 +15,12 @@ export async function postUserPropertiesOnline(
userProperties: any,
abortController: AbortController
): Promise<any> {
const sessionLocation = await getSessionLocation();
const locationUuid = sessionLocation?.uuid;

await openmrsFetch(`/ws/rest/v1/user/${userUuid}`, {
method: "POST",
body: { userProperties },
headers: { "Content-Type": "application/json" },
signal: abortController.signal,
});

if (locationUuid) {
await setSessionLocation(locationUuid, abortController);
}
}

export type PostSessionLocale = (
Expand Down

0 comments on commit 05394ee

Please sign in to comment.