Commit 3291bc4d authored by Viacheslav Pavlov's avatar Viacheslav Pavlov

Merge branch...

Merge branch '600-the-server-is-responding-with-a-status-403-if-user-clicks-on-any-place-without-accessions' into 'master'

The server is responding with a status 403 if user clicks on any place without accessions

Closes #600

See merge request genesys-pgr/genesys-ui!590
parents d5faae2e 1bb8d607
......@@ -43,7 +43,7 @@ const apiAccessionsOverview = createApiCaller(AccessionService.listOverview, REC
const apiAccessionsMapInfo = createApiCaller(AccessionService.mapInfo, RECEIVE_ACCESSION_MAPINFO);
const apiGeoJson = createPureApiCaller(AccessionService.geoJson);
const apiClimateInfo = createPureApiCaller(ClimateService.getCurrentClimate);
const apiClimateInfoSilent = createPureApiCaller(ClimateService.getCurrentClimate, {silentError: true});
const apiAutocomplete = createPureApiCaller(AccessionService.autocomplete);
const apiListAccessionByUuid = createPureApiCaller(AccessionService.listAllByUuid);
......@@ -155,7 +155,7 @@ export const geoJsonRequest = (filter, limit) => (dispatch) => {
};
export const currentClimateRequest = (lat, lng) => (dispatch) => {
return dispatch(apiClimateInfo(lat, lng));
return dispatch(apiClimateInfoSilent(lat, lng));
};
export const loadAccessionsMapInfo = (filters: string | AccessionFilter, viewPort?: {center: number[], zoom: number}) => (dispatch) => {
......
......@@ -325,9 +325,7 @@ class MapPage extends React.Component<IMapPageProps, any> {
return this.setState({climateData: res, dialogOpened: true});
})
.catch((error) => {
if (error.code === 404) {
return showSnackbar(t('accessions.public.p.map.noClimateData'));
}
showSnackbar(t('accessions.public.p.map.noClimateData'));
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment