Commit a18b860a authored by Dennis Willers's avatar Dennis Willers 🏀

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

parent 3b4a24de
Pipeline #338 passed with stages
in 5 minutes and 31 seconds
...@@ -53,7 +53,7 @@ export class GameComponent implements OnInit { ...@@ -53,7 +53,7 @@ export class GameComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
this.sessionName = String(params.get('sessionName')); this.sessionName = String(params.get('sessionName')).toLowerCase();
this.team = String(params.get('team')); this.team = String(params.get('team'));
const url = this.router.url.split('/'); const url = this.router.url.split('/');
const checkUser = url[url.length - 1]; const checkUser = url[url.length - 1];
......
...@@ -35,7 +35,7 @@ export class GuesserComponent implements OnInit { ...@@ -35,7 +35,7 @@ export class GuesserComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
this.sessionName = String(params.get('sessionName')); this.sessionName = String(params.get('sessionName')).toLowerCase();
this.team = String(params.get('team')); this.team = String(params.get('team'));
if (!this.isAllowedToPlay.isAllowed || this.isAllowedToPlay.role !== 'guesser') { if (!this.isAllowedToPlay.isAllowed || this.isAllowedToPlay.role !== 'guesser') {
this.router.navigate([this.sessionName + '/' + this.team]); this.router.navigate([this.sessionName + '/' + this.team]);
......
...@@ -39,7 +39,7 @@ export class OverviewComponent implements OnInit { ...@@ -39,7 +39,7 @@ export class OverviewComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.activatedRoute.paramMap.subscribe(params => { this.activatedRoute.paramMap.subscribe(params => {
this.sessionName = String(params.get('sessionName')); this.sessionName = String(params.get('sessionName')).toLowerCase();
this.team = String(params.get('team')); this.team = String(params.get('team'));
console.log('Team:', this.team); console.log('Team:', this.team);
if (this.team === 'red'){ if (this.team === 'red'){
......
...@@ -41,7 +41,7 @@ export class SelectGameComponent implements OnInit { ...@@ -41,7 +41,7 @@ export class SelectGameComponent implements OnInit {
} }
keyPressAlphaNumeric(event: KeyboardEvent): boolean { keyPressAlphaNumeric(event: KeyboardEvent): boolean {
if (/[a-zA-Z0-9]/.test(event.key)) { if (/[a-z0-9]/.test(event.key)) {
return true; return true;
} else { } else {
event.preventDefault(); event.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment