updated files to ES6

This commit is contained in:
2023-08-17 12:28:32 -04:00
parent 80237f76e6
commit 41325f7a55
8 changed files with 287 additions and 300 deletions
+3 -3
View File
@@ -5,8 +5,8 @@ Auth = {}
Auth.errors = {}
Auth.errors.login = function(){
let error = new Error('PamLoginFailed');
error.name = 'PamLoginFailed';
let error = new Error('LoginFailed');
error.name = 'LoginFailed';
error.message = `Invalid Credentials, login failed.`;
error.status = 401;
@@ -20,7 +20,7 @@ Auth.login = async function(data){
return {user, token}
}catch(error){
throw error;
throw this.errors.login();
}
};