Skip to content

Commit aa2741d

Browse files
committed
fix(client:auth): fixes TS warnings, clarify function use
1 parent f12cad7 commit aa2741d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
100100
/**
101101
* Gets all available info on a user
102102
*
103-
* @param {Function} [callback] - funciton(user)
103+
* @param {Function} [callback] - optional, function(user)
104104
* @return {Promise}
105105
*/
106106
getCurrentUser(callback) {
@@ -134,7 +134,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
134134
* @return {Bool|Promise}
135135
*/
136136
isLoggedIn(callback) {
137-
return Auth.getCurrentUser()
137+
return Auth.getCurrentUser(undefined)
138138
.then(user => {
139139
var is = user.hasOwnProperty('role');
140140
safeCb(callback)(is);
@@ -159,7 +159,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
159159
* @return {Bool|Promise}
160160
*/
161161
hasRole(role, callback) {
162-
return Auth.getCurrentUser()
162+
return Auth.getCurrentUser(undefined)
163163
.then(user => {
164164
var has = user.hasOwnProperty('role')
165165
? hasRole(user.role, role)

0 commit comments

Comments
 (0)