switch console logs for logClient

This commit is contained in:
Anton Georgiev 2017-05-12 08:24:06 -04:00
parent a4dcf72975
commit 2e9c519e1a

View File

@ -4,7 +4,7 @@ import { Tracker } from 'meteor/tracker';
import Storage from '/imports/ui/services/storage/session'; import Storage from '/imports/ui/services/storage/session';
import Users from '/imports/api/users'; import Users from '/imports/api/users';
import { makeCall } from '/imports/ui/services/api'; import { makeCall, logClient } from '/imports/ui/services/api';
const CONNECTION_TIMEOUT = Meteor.settings.public.app.connectionTimeout; const CONNECTION_TIMEOUT = Meteor.settings.public.app.connectionTimeout;
@ -99,9 +99,8 @@ class Auth {
// do **not** use the custom call - it relies on expired data // do **not** use the custom call - it relies on expired data
Meteor.call('userLogout', credentialsSnapshot, (error, result) => { Meteor.call('userLogout', credentialsSnapshot, (error, result) => {
if (error) { if (error) {
console.error('error=', error); logClient('error', { error, method: 'userLogout', credentialsSnapshot });
} else { } else {
console.log('result=', result);
this.fetchLogoutUrl() this.fetchLogoutUrl()
.then(this.clearCredentials) .then(this.clearCredentials)
.then(resolve); .then(resolve);
@ -123,7 +122,6 @@ class Auth {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
Tracker.autorun((c) => { Tracker.autorun((c) => {
if (!(credentials.meetingId && credentials.requesterToken && credentials.requesterUserId)) { if (!(credentials.meetingId && credentials.requesterToken && credentials.requesterUserId)) {
debugger;
reject({ reject({
error: 500, error: 500,
description: 'Authentication subscription failed due to missing credentials.', description: 'Authentication subscription failed due to missing credentials.',