Skip to content

Commit

Permalink
fix(handleservice.js): added status attribute in success and failure
Browse files Browse the repository at this point in the history
  • Loading branch information
opensrc0 committed Mar 21, 2024
1 parent b5f8955 commit 5af3605
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion __app/component/LocateMe/LocateMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const checkPermitByBrowser = async (disbaleToast, failureMsg, failureCb) => {
};
const checkScriptInBrowser = async (disbaleToast, failureMsg, failureCb, isProdKey, googleKey) => {
if (!googleKey) {
return handleError({ disbaleToast, msgType: 'GOOGLE_API_KEY_MISSING', msg: failureMsg.googleAPIKeyMissing || 'Unable to check browser permission', failureCb });
return handleError({ disbaleToast, msgType: 'GOOGLE_API_KEY_MISSING', msg: failureMsg.googleAPIKeyMissing || 'Google Key is missing', failureCb });
}
const googleApiUrl = `https://maps.googleapis.com/maps/api/js?${isProdKey ? 'client' : 'key'}=${googleKey}&libraries=places&loading=async`;

Expand Down
2 changes: 2 additions & 0 deletions __app/component/services/handlerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const handleSuccess = ({ disbaleToast, msg, msgType, successCb, data }) =
msgType,
msg,
data,
status: 'SUCCESS',
});
};

Expand All @@ -14,6 +15,7 @@ export const handleError = ({ disbaleToast, msg, msgType, failureCb }) => {
failureCb({
msgType,
msg,
status: 'FAILURE',
});

return false;
Expand Down

0 comments on commit 5af3605

Please sign in to comment.