summaryrefslogtreecommitdiffstats
path: root/web/react/utils/client.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-23 08:38:15 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-23 08:38:15 -0700
commit028657b43ed7d6e2b0adca322e2d47781c1b3eb4 (patch)
tree7366462741ae8f980f8066d1daa8166ae8a3c17b /web/react/utils/client.jsx
parent009982cd4514c6f0950138b15367df559c8f4dd2 (diff)
parent0cf24be0662fb9ee2a3b52bfb8c3903bc8c32b72 (diff)
downloadchat-028657b43ed7d6e2b0adca322e2d47781c1b3eb4.tar.gz
chat-028657b43ed7d6e2b0adca322e2d47781c1b3eb4.tar.bz2
chat-028657b43ed7d6e2b0adca322e2d47781c1b3eb4.zip
Merge branch 'master' into PLT-25
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r--web/react/utils/client.jsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index eca4f4b3e..fb6b45a1f 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -4,8 +4,8 @@ var BrowserStore = require('../stores/browser_store.jsx');
var TeamStore = require('../stores/team_store.jsx');
var ErrorStore = require('../stores/error_store.jsx');
-export function track(category, action, label, prop, val) {
- global.window.analytics.track(action, {category: category, label: label, property: prop, value: val});
+export function track(category, action, label, property, value) {
+ global.window.analytics.track(action, {category, label, property, value});
}
export function trackPage() {
@@ -232,6 +232,7 @@ export function logout() {
track('api', 'api_users_logout');
var currentTeamUrl = TeamStore.getCurrentTeamUrl();
BrowserStore.clear();
+ ErrorStore.storeLastError(null);
window.location.href = currentTeamUrl + '/logout';
}
@@ -399,10 +400,9 @@ export function getAllTeams(success, error) {
});
}
-export function getMeSynchronous(success, error) {
+export function getMe(success, error) {
var currentUser = null;
$.ajax({
- async: false,
cache: false,
url: '/api/v1/users/me',
dataType: 'json',
@@ -416,7 +416,7 @@ export function getMeSynchronous(success, error) {
},
error: function onError(xhr, status, err) {
if (error) {
- var e = handleError('getMeSynchronous', xhr, status, err);
+ var e = handleError('getMe', xhr, status, err);
error(e);
}
}