fix: Remove constructor injection
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
Pull Request Labeler / labeler (pull_request_target) Successful in 5s
CI / Backend Tests (pull_request) Has been skipped
CI / Checkstyle Main (pull_request) Has been skipped
Label PRs based on size / Check PR size (pull_request) Successful in 14s
CI / Docker backend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Successful in 23s
CI / eslint (pull_request) Successful in 27s
CI / prettier (pull_request) Successful in 26s
CI / Docker frontend validation (pull_request) Successful in 46s
CI / test-build (pull_request) Successful in 52s
Claude PR Review / claude-code (pull_request) Successful in 1m14s
CI / Playwright (pull_request) Successful in 2m10s

This commit is contained in:
Jan K9f 2025-06-10 12:59:14 +02:00
commit 94eaf98250
17 changed files with 88 additions and 64 deletions

View file

@ -1,4 +1,4 @@
import { ChangeDetectorRef, Component } from '@angular/core';
import { ChangeDetectorRef, Component, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ActivatedRoute, Router } from '@angular/router';
import { LootboxService } from '../services/lootbox.service';
@ -26,14 +26,14 @@ export default class LootboxOpeningComponent {
currentUser: User | null = null;
private winSound: HTMLAudioElement;
constructor(
private route: ActivatedRoute,
private router: Router,
private lootboxService: LootboxService,
private userService: UserService,
private authService: AuthService,
private cdr: ChangeDetectorRef
) {
private route = inject(ActivatedRoute);
private router = inject(Router);
private lootboxService = inject(LootboxService);
private userService = inject(UserService);
private authService = inject(AuthService);
private cdr = inject(ChangeDetectorRef);
constructor() {
this.winSound = new Audio('/sounds/win.mp3');
this.loadLootbox();
this.authService.userSubject.subscribe((user) => {