Browse Source

Fixed a problem with verifications by user attribute not working

jalbr74 7 years ago
parent
commit
ec4d64232b

+ 5 - 3
client/src/services/helpdesk.service.ts

@@ -275,12 +275,14 @@ export default class HelpDeskService implements IHelpDeskService {
 
 
         return this.pwmService
         return this.pwmService
             .httpRequest(url, { data: data })
             .httpRequest(url, { data: data })
-            .then((result: IValidationStatus) => {
+            .then((result: any) => {
+                const validationStatus: IValidationStatus = result.data;
+
                 this.localStorageService.setItem(
                 this.localStorageService.setItem(
                     this.localStorageService.keys.VERIFICATION_STATE,
                     this.localStorageService.keys.VERIFICATION_STATE,
-                    result.verificationState
+                    validationStatus.verificationState
                 );
                 );
-                return this.$q.resolve(result);
+                return this.$q.resolve(validationStatus);
             });
             });
     }
     }
 
 

+ 1 - 1
client/src/services/local-storage.service.ts

@@ -52,7 +52,7 @@ export default class LocalStorageService {
     }
     }
 
 
     setItem(key: string, value: any): void {
     setItem(key: string, value: any): void {
-        if (this.localStorageEnabled) {
+        if (this.localStorageEnabled && value) {
             this.$window.sessionStorage[this.prepKey(key)] = value;
             this.$window.sessionStorage[this.prepKey(key)] = value;
         }
         }
     }
     }