Issues (23)

src/classes/validations/SmileValidation.js (1 issue)

1
2
class SmileValidation {
3
4
    validate(response){
5
6
        const isVerified = this.verify(response);
7
    
8
        if(isVerified == true){
0 ignored issues
show
Comparing isVerified to true using the == operator is not safe. Consider using === instead.
Loading history...
9
            return response;
10
        }
11
                
12
        return isVerified;
13
    }
14
15
     /**
16
    * Verify Smile information
17
    *
18
    * @param {object} result
19
    * @return boolean
20
    */
21
    verify(result){
22
        const data = result.data;
23
24
        if (data.Actions.Verify_ID_Number !== 'Verified') {
25
            return { 'error' : data.ResultText } ;
26
        }
27
     
28
        return true;
29
30
    }
31
32
}
33
34
module.exports = SmileValidation;