mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Clean up the error code when the OAuth user is not authorized.
This commit is contained in:
parent
73340d4fb6
commit
d443efd8ea
1 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
|
||||
import { AuthService } from "../auth/auth.service";
|
||||
import { NotificationService } from "../services";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./loginoauth.component.html",
|
||||
|
@ -11,7 +12,7 @@ export class LoginOAuthComponent implements OnInit {
|
|||
public error: string;
|
||||
|
||||
constructor(private authService: AuthService, private router: Router,
|
||||
private route: ActivatedRoute) {
|
||||
private route: ActivatedRoute, private notify: NotificationService) {
|
||||
this.route.params
|
||||
.subscribe((params: any) => {
|
||||
this.pin = params.pin;
|
||||
|
@ -37,6 +38,10 @@ export class LoginOAuthComponent implements OnInit {
|
|||
this.error = x.errorMessage;
|
||||
}
|
||||
|
||||
}, err => {
|
||||
this.notify.error(err.statusText);
|
||||
|
||||
this.router.navigate(["login"]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue