From ecdc07af9dd376aa1b99a5ce7f83f8e049b37780 Mon Sep 17 00:00:00 2001 From: NyxiumYuuki Date: Fri, 28 May 2021 21:03:34 +0200 Subject: [PATCH] navigate to general by default --- frontend/src/app/login/login.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/login/login.component.ts b/frontend/src/app/login/login.component.ts index 5ef93c3..b2c0c55 100644 --- a/frontend/src/app/login/login.component.ts +++ b/frontend/src/app/login/login.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit } from '@angular/core'; -import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; import {Router} from "@angular/router"; import {AuthService} from "../services/auth/auth.service"; @@ -10,7 +9,6 @@ import {AuthService} from "../services/auth/auth.service"; }) export class LoginComponent implements OnInit { - login = ''; password = ''; errorMessage = ''; @@ -27,7 +25,8 @@ export class LoginComponent implements OnInit { this.auth.sendAuthentication(this.login, this.password).subscribe(data => { this.auth.finalizeAuthentication(data); if (this.auth.islog === true) { - this.router.navigateByUrl('/private'); + sessionStorage.setItem('login', this.login); + this.router.navigateByUrl('/general'); } else { this.errorMessage = data.data.reason; console.log(this.errorMessage);