Skip to content

Commit 95f25af

Browse files
committed
style(client:auth.service): use object shorthand
1 parent 4ac7235 commit 95f25af

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
2929
* @return {Promise}
3030
*/
3131
login({email, password}, callback: Function) {
32-
return $http.post('/auth/local', {
33-
email: email,
34-
password: password
35-
})
32+
return $http.post('/auth/local', { email, password })
3633
.then(res => {
3734
$cookies.put('token', res.data.token);
3835
currentUser = User.get();
@@ -86,10 +83,7 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
8683
* @return {Promise}
8784
*/
8885
changePassword(oldPassword, newPassword, callback) {
89-
return User.changePassword({ id: currentUser._id }, {
90-
oldPassword: oldPassword,
91-
newPassword: newPassword
92-
}, function() {
86+
return User.changePassword({ id: currentUser._id }, { oldPassword, newPassword }, function() {
9387
return safeCb(callback)(null);
9488
}, function(err) {
9589
return safeCb(callback)(err);

0 commit comments

Comments
 (0)