Always request a fresh response from the config endpoint

This commit is contained in:
D. Berge
2023-11-04 10:36:21 +01:00
parent 4c612ffe0a
commit 3da54f9334

View File

@@ -1,6 +1,11 @@
async function getProject ({commit, dispatch}, projectId) {
const res = await dispatch('api', [`/project/${String(projectId).toLowerCase()}/configuration`]);
const init = {
headers: {
"If-None-Match": "" // Ensure we get a fresh response
}
};
const res = await dispatch('api', [`/project/${String(projectId).toLowerCase()}/configuration`, init]);
if (res) {
commit('setProjectName', res.name);
commit('setProjectId', res.id?.toLowerCase());