mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2025-05-18 20:38:14 +08:00
Fixed activation page not redirecting properly on success and password reset fields not setting proper values
This commit is contained in:
parent
150663587c
commit
45c9fd588a
3 changed files with 9 additions and 9 deletions
|
@ -63,9 +63,9 @@ export function ParseError(error: { response: { data: string } }) {
|
|||
}
|
||||
// User APIs
|
||||
|
||||
export function RegisterAPI(register: RegisterType) {
|
||||
export function RegisterAPI(info: RegisterType) {
|
||||
return instance
|
||||
.post("api/v1/accounts/users/", register)
|
||||
.post("api/v1/accounts/users/", info)
|
||||
.then(async (response) => {
|
||||
console.log(response.data);
|
||||
return [true, 0];
|
||||
|
@ -86,11 +86,11 @@ export function LoginAPI(user: LoginType, remember_session: boolean) {
|
|||
setRefreshToken(response.data.refresh);
|
||||
}
|
||||
|
||||
console.log("Login Success ");
|
||||
console.log("Login Success");
|
||||
return true;
|
||||
})
|
||||
.catch(() => {
|
||||
console.log("Login Failed");
|
||||
.catch((error) => {
|
||||
console.log("Login Failed", error.response.data);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue