Skip to content
Snippets Groups Projects
Commit 66b022c8 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

get basemaps even if not authenticated

parent 13805540
No related branches found
No related tags found
2 merge requests!424version 3.1.0,!410REDMINE_ISSUE-13848|Si on n'est pas connecté, on ne vois pas les fonds de plan customisés
...@@ -115,14 +115,12 @@ const projectsStore = { ...@@ -115,14 +115,12 @@ const projectsStore = {
return project; return project;
}, },
async GET_PROJECT_INFO({ rootState, dispatch }, slug) { async GET_PROJECT_INFO({ dispatch }, slug) {
const promises = [ const promises = [
dispatch('GET_PROJECT_LAST_MESSAGES', slug).then(response => response), dispatch('GET_PROJECT_LAST_MESSAGES', slug).then(response => response),
dispatch('feature-type/GET_PROJECT_FEATURE_TYPES', slug, { root: true }).then(response => response), dispatch('feature-type/GET_PROJECT_FEATURE_TYPES', slug, { root: true }).then(response => response),
dispatch('map/GET_BASEMAPS', slug, { root: true }).then(response => response)
]; ];
if (rootState.user) {
promises.push(dispatch('map/GET_BASEMAPS', slug, { root: true }).then(response => response));
}
const promiseResult = await Promise.all(promises); const promiseResult = await Promise.all(promises);
return promiseResult; return promiseResult;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment