Skip to content

Commit 07fa212

Browse files
committed
don't make request that triggers 401 in auth
1 parent ce007bb commit 07fa212

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/templates/client/components/auth(auth)/auth.service(coffee).coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
angular.module('<%= scriptAppName %>').factory 'Auth', Auth = ($location, $rootScope, $http, User, $cookieStore, $q) ->
4-
currentUser = (if $cookieStore.get('token') then User.get() else {})
4+
currentUser = $cookieStore.get('token') || {}
55

66
###
77
Authenticate user and save token

app/templates/client/components/auth(auth)/auth.service(js).js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
angular.module('<%= scriptAppName %>')
44
.factory('Auth', function Auth($location, $rootScope, $http, User, $cookieStore, $q) {
55

6-
var currentUser = $cookieStore.get('token') ? User.get() : {};
6+
var currentUser = $cookieStore.get('token') || {};
77

88
return {
99

0 commit comments

Comments
 (0)