mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:37: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`;
|
||||
const init = {
|
||||
cache: "reload",
|
||||
signal: state.loading.signal
|
||||
};
|
||||
const res = await dispatch('api', [url, init]);
|
||||
|
||||
@@ -11,6 +11,7 @@ async function refreshLabels ({commit, dispatch, state, rootState}) {
|
||||
const pid = rootState.project.projectId;
|
||||
const url = `/project/${pid}/label`;
|
||||
const init = {
|
||||
cache: "reload",
|
||||
signal: state.loading.signal
|
||||
};
|
||||
const res = await dispatch('api', [url, init]);
|
||||
|
||||
@@ -11,6 +11,7 @@ async function refreshLines ({commit, dispatch, state, rootState}) {
|
||||
const pid = rootState.project.projectId;
|
||||
const url = `/project/${pid}/line`;
|
||||
const init = {
|
||||
cache: "reload",
|
||||
signal: state.loading.signal
|
||||
};
|
||||
const res = await dispatch('api', [url, init]);
|
||||
|
||||
@@ -11,6 +11,7 @@ async function refreshPlan ({commit, dispatch, state, rootState}) {
|
||||
const pid = rootState.project.projectId;
|
||||
const url = `/project/${pid}/plan`;
|
||||
const init = {
|
||||
cache: "reload",
|
||||
signal: state.loading.signal
|
||||
};
|
||||
const res = await dispatch('api', [url, init]);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
async function getProject ({commit, dispatch}, projectId) {
|
||||
const init = {
|
||||
headers: {
|
||||
cache: "reload",
|
||||
"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 url = `/project`;
|
||||
const init = {
|
||||
cache: "reload",
|
||||
signal: state.loading.signal
|
||||
};
|
||||
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 url = `/project/${pid}/sequence?files=true`;
|
||||
const init = {
|
||||
cache: "reload",
|
||||
signal: state.loading.signal
|
||||
};
|
||||
const res = await dispatch('api', [url, init]);
|
||||
|
||||
Reference in New Issue
Block a user