File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ const authModel  = require('../models/auth');
55const  helpers     =  require ( '../lib/helpers' ) ; 
66const  TokenModel  =  require ( '../models/token' ) ; 
77
8+ const  ERROR_MESSAGE_INVALID_AUTH  =  'Invalid email or password' ; 
9+ 
810module . exports  =  { 
911
1012	/** 
@@ -69,15 +71,15 @@ module.exports = {
6971													} ; 
7072												} ) ; 
7173										}  else  { 
72- 											throw  new  error . AuthError ( 'Invalid password' ) ; 
74+ 											throw  new  error . AuthError ( ERROR_MESSAGE_INVALID_AUTH ) ; 
7375										} 
7476									} ) ; 
7577							}  else  { 
76- 								throw  new  error . AuthError ( 'No password auth for user' ) ; 
78+ 								throw  new  error . AuthError ( ERROR_MESSAGE_INVALID_AUTH ) ; 
7779							} 
7880						} ) ; 
7981				}  else  { 
80- 					throw  new  error . AuthError ( 'No relevant user found' ) ; 
82+ 					throw  new  error . AuthError ( ERROR_MESSAGE_INVALID_AUTH ) ; 
8183				} 
8284			} ) ; 
8385	} , 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments