feat: initial project prototype #2

Merged
naomi merged 14 commits from feat/init into main 2025-02-17 14:03:33 -08:00
Showing only changes of commit 278deb6d47 - Show all commits

View File

@ -45,25 +45,20 @@ export class ReviewComponent {
if (!storedToken) { if (!storedToken) {
return; return;
} }
this.token.setValue(storedToken); this.apiService.validateToken(storedToken)
this.valid = true; .then((valid) => {
if (valid) {
/* this.valid = true;
* This.apiService this.token.setValue(storedToken);
* .validateToken(storedToken) } else {
* .then((valid) => { this.error = 'The token found in local storage is invalid.';
* if (valid) { this.valid = false;
* this.valid = true; }
* } else { })
* this.error = 'The token found in local storage is invalid.'; .catch(() => {
* this.valid = false; this.error = 'An error occurred while validating the token found in local storage.';
* } this.valid = false;
* }) });
* .catch(() => {
* this.error = 'An error occurred while validating your stored token.';
* this.valid = false;
* });
*/
} }
/** /**