UI #4

Merged
derek merged 26 commits from UI into main 2025-07-18 19:59:18 -07:00
4 changed files with 10 additions and 7 deletions
Showing only changes of commit 792e0abba3 - Show all commits
@@ -43,10 +43,13 @@ export class LoginComponent {
}
this.errorMsgs.push("Waiting for response from server");
this.auth.Login(this.UserName, this.Password, this.StayLoggedIn).subscribe(
data => {
this.auth.Login(this.UserName, this.Password, this.StayLoggedIn).subscribe({
next: data => {
this.router.navigate([this.returnURL]);
},
error: err => {
this.errorMsgs = [ err.error ];
}
)
})
}
}
@@ -73,7 +73,7 @@ export class RegisterComponent {
this.router.navigate([this.returnURL]);
},
error: err => {
console.log("HTTP Error Signing In: ", err);
this.errorMsgs = [ err.error ]
}
});
}
@@ -28,7 +28,7 @@ export class Authentication{
this.setUserToStorage(data, StayLoggedIn == true ? SessionType.Forever : SessionType.Session);
},
error: err => {
console.log("HTTP Error Signing In: ", err);
console.log("HTTP Error Signing In: ", err.error);
}
});
return sub;
@@ -51,7 +51,7 @@ namespace BoredCareers.Controllers {
} else {
test.CurrentPasswordAttempts += 1;
await _databaseService.SetAccount(test);
return Ok(new Account() { ID = -1, UserName = "Wrong Password" });
return NotFound("Wrong Password");
}
} else {
await SendVerify(test.UserName);
@@ -92,7 +92,7 @@ namespace BoredCareers.Controllers {
}
} catch (Exception ex) {
Console.WriteLine("Register Error: " + ex.Message);
return NotFound();
return NotFound("An internal server error has occured");
}
}