mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 09:27:07 +00:00
Request fresh responses when refreshing data from the server
This commit is contained in:
@@ -17,6 +17,7 @@ async function refreshEvents ({commit, dispatch, state, rootState}, [modifiedAft
|
|||||||
? `/project/${pid}/event/changes/${(new Date(modifiedAfter)).toISOString()}?unique=t`
|
? `/project/${pid}/event/changes/${(new Date(modifiedAfter)).toISOString()}?unique=t`
|
||||||
: `/project/${pid}/event`;
|
: `/project/${pid}/event`;
|
||||||
const init = {
|
const init = {
|
||||||
|
cache: "reload",
|
||||||
signal: state.loading.signal
|
signal: state.loading.signal
|
||||||
};
|
};
|
||||||
const res = await dispatch('api', [url, init]);
|
const res = await dispatch('api', [url, init]);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ async function refreshLabels ({commit, dispatch, state, rootState}) {
|
|||||||
const pid = rootState.project.projectId;
|
const pid = rootState.project.projectId;
|
||||||
const url = `/project/${pid}/label`;
|
const url = `/project/${pid}/label`;
|
||||||
const init = {
|
const init = {
|
||||||
|
cache: "reload",
|
||||||
signal: state.loading.signal
|
signal: state.loading.signal
|
||||||
};
|
};
|
||||||
const res = await dispatch('api', [url, init]);
|
const res = await dispatch('api', [url, init]);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ async function refreshLines ({commit, dispatch, state, rootState}) {
|
|||||||
const pid = rootState.project.projectId;
|
const pid = rootState.project.projectId;
|
||||||
const url = `/project/${pid}/line`;
|
const url = `/project/${pid}/line`;
|
||||||
const init = {
|
const init = {
|
||||||
|
cache: "reload",
|
||||||
signal: state.loading.signal
|
signal: state.loading.signal
|
||||||
};
|
};
|
||||||
const res = await dispatch('api', [url, init]);
|
const res = await dispatch('api', [url, init]);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ async function refreshPlan ({commit, dispatch, state, rootState}) {
|
|||||||
const pid = rootState.project.projectId;
|
const pid = rootState.project.projectId;
|
||||||
const url = `/project/${pid}/plan`;
|
const url = `/project/${pid}/plan`;
|
||||||
const init = {
|
const init = {
|
||||||
|
cache: "reload",
|
||||||
signal: state.loading.signal
|
signal: state.loading.signal
|
||||||
};
|
};
|
||||||
const res = await dispatch('api', [url, init]);
|
const res = await dispatch('api', [url, init]);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
async function getProject ({commit, dispatch}, projectId) {
|
async function getProject ({commit, dispatch}, projectId) {
|
||||||
const init = {
|
const init = {
|
||||||
headers: {
|
headers: {
|
||||||
|
cache: "reload",
|
||||||
"If-None-Match": "" // Ensure we get a fresh response
|
"If-None-Match": "" // Ensure we get a fresh response
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ async function refreshProjects ({commit, dispatch, state, rootState}) {
|
|||||||
const pid = rootState.project.projectId;
|
const pid = rootState.project.projectId;
|
||||||
const url = `/project`;
|
const url = `/project`;
|
||||||
const init = {
|
const init = {
|
||||||
|
cache: "reload",
|
||||||
signal: state.loading.signal
|
signal: state.loading.signal
|
||||||
};
|
};
|
||||||
const res = await dispatch('api', [url, init, null, {silent:true}]);
|
const res = await dispatch('api', [url, init, null, {silent:true}]);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ async function refreshSequences ({commit, dispatch, state, rootState}) {
|
|||||||
const pid = rootState.project.projectId;
|
const pid = rootState.project.projectId;
|
||||||
const url = `/project/${pid}/sequence?files=true`;
|
const url = `/project/${pid}/sequence?files=true`;
|
||||||
const init = {
|
const init = {
|
||||||
|
cache: "reload",
|
||||||
signal: state.loading.signal
|
signal: state.loading.signal
|
||||||
};
|
};
|
||||||
const res = await dispatch('api', [url, init]);
|
const res = await dispatch('api', [url, init]);
|
||||||
|
|||||||
Reference in New Issue
Block a user