summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/stores/actions.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-03-13 09:19:41 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-03-13 09:19:41 +0000
commit939c87233e2b825d1573f7f50ac536fe994fbc2f (patch)
tree0a7d2b2fbd51b2a8b76248dab549acb9923ef6e3 /app/assets/javascripts/notes/stores/actions.js
parente84c943fa0609d05184cb95c845fa35cc1fcd432 (diff)
parent51f91537640d71262c2fa5070dfb7f8178d1decd (diff)
downloadgitlab-ce-939c87233e2b825d1573f7f50ac536fe994fbc2f.tar.gz
Merge branch 'master' into 44149-issue-comment-buttons
* master: (29 commits) Fix provider server URL used when listing repos to import Fix inconsistent punctuation on MR form Update dependency for svgs Fix timestamp to include %M instead of %I for post-deploy migrations. Use Gitaly 0.89.0 Resolve "Hover style for sidebar dropdowns is wrong" fixed spec Respect the protocol in `expose_url` Fix removes source branch text being rendered in merged state Fix code and wiki search results when filename is non-ASCII Include the ee/ directory in backtraces Use GitLab fork of zaproxy Updates file extensions on Vue docs fixed note polling not sending updated last fetched at date added spec for polling Add changelog entry Use `list.id` for `:key` added mutation spec Bump parser and unparser gems to remove warnings fix polling not working correctly Fixed issue notes being duplicated ...
Diffstat (limited to 'app/assets/javascripts/notes/stores/actions.js')
-rw-r--r--app/assets/javascripts/notes/stores/actions.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes/stores/actions.js b/app/assets/javascripts/notes/stores/actions.js
index 70fc368a471..ebbacb576d6 100644
--- a/app/assets/javascripts/notes/stores/actions.js
+++ b/app/assets/javascripts/notes/stores/actions.js
@@ -209,18 +209,16 @@ const pollSuccessCallBack = (resp, commit, state, getters) => {
});
}
- commit(types.SET_LAST_FETCHED_AT, resp.lastFetchedAt);
+ commit(types.SET_LAST_FETCHED_AT, resp.last_fetched_at);
return resp;
};
export const poll = ({ commit, state, getters }) => {
- const requestData = { endpoint: state.notesData.notesPath, lastFetchedAt: state.lastFetchedAt };
-
eTagPoll = new Poll({
resource: service,
method: 'poll',
- data: requestData,
+ data: state,
successCallback: resp => resp.json()
.then(data => pollSuccessCallBack(data, commit, state, getters)),
errorCallback: () => Flash('Something went wrong while fetching latest comments.'),
@@ -229,7 +227,7 @@ export const poll = ({ commit, state, getters }) => {
if (!Visibility.hidden()) {
eTagPoll.makeRequest();
} else {
- service.poll(requestData);
+ service.poll(state);
}
Visibility.change(() => {