Commit a18b860a authored by Dennis Willers's avatar Dennis Willers
Browse files

Just can write lower case sessions. Read session name always to lower case

parent 3b4a24de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ export class GameComponent implements OnInit {

  ngOnInit(): void {
    this.activatedRoute.paramMap.subscribe(params => {
      this.sessionName = String(params.get('sessionName'));
      this.sessionName = String(params.get('sessionName')).toLowerCase();
      this.team = String(params.get('team'));
      const url = this.router.url.split('/');
      const checkUser = url[url.length - 1];
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ export class GuesserComponent implements OnInit {

  ngOnInit(): void {
    this.activatedRoute.paramMap.subscribe(params => {
      this.sessionName = String(params.get('sessionName'));
      this.sessionName = String(params.get('sessionName')).toLowerCase();
      this.team = String(params.get('team'));
      if (!this.isAllowedToPlay.isAllowed || this.isAllowedToPlay.role !== 'guesser') {
        this.router.navigate([this.sessionName + '/' + this.team]);
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ export class OverviewComponent implements OnInit {

  ngOnInit(): void {
    this.activatedRoute.paramMap.subscribe(params => {
      this.sessionName = String(params.get('sessionName'));
      this.sessionName = String(params.get('sessionName')).toLowerCase();
      this.team = String(params.get('team'));
      console.log('Team:', this.team);
      if (this.team === 'red'){
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ export class SelectGameComponent implements OnInit {
  }

  keyPressAlphaNumeric(event: KeyboardEvent): boolean {
    if (/[a-zA-Z0-9]/.test(event.key)) {
    if (/[a-z0-9]/.test(event.key)) {
      return true;
    } else {
      event.preventDefault();