Compare commits

..

4 commits

Author SHA1 Message Date
b07a3a935a
Merge pull request 'refactor: remove unused imports and clean up code' (!138) from refactor/imports into main
All checks were successful
Release / Release (push) Successful in 1m1s
Reviewed-on: #138
Reviewed-by: lziemke <lea.z4@schule.bremen.de>
2025-04-23 11:44:22 +00:00
csimonis
0cc8ff50aa style: format import statements for readability
All checks were successful
CI / Get Changed Files (pull_request) Successful in 6s
CI / prettier (pull_request) Successful in 30s
CI / eslint (pull_request) Successful in 35s
CI / Checkstyle Main (pull_request) Successful in 49s
CI / test-build (pull_request) Successful in 45s
2025-04-23 13:43:12 +02:00
csimonis
6f3f3791c3 refactor: remove unused imports and clean up code
Some checks failed
CI / Get Changed Files (pull_request) Successful in 6s
CI / prettier (pull_request) Failing after 29s
CI / eslint (pull_request) Successful in 36s
CI / test-build (pull_request) Successful in 44s
CI / Checkstyle Main (pull_request) Successful in 59s
2025-04-23 13:39:55 +02:00
csimonis
66e5d730dd refactor: reorganize import statements and clean up code 2025-04-23 13:39:49 +02:00
25 changed files with 35 additions and 70 deletions

View file

@ -1,20 +1,10 @@
package de.szut.casino; package de.szut.casino;
import de.szut.casino.lootboxes.LootBoxEntity;
import de.szut.casino.lootboxes.LootBoxRepository;
import de.szut.casino.lootboxes.RewardEntity;
import de.szut.casino.lootboxes.RewardRepository;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@SpringBootApplication @SpringBootApplication
public class CasinoApplication { public class CasinoApplication {

View file

@ -1,12 +1,8 @@
package de.szut.casino.blackjack; package de.szut.casino.blackjack;
import de.szut.casino.user.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Optional;
@Service @Service
public interface BlackJackGameRepository extends JpaRepository<BlackJackGameEntity, Long> { public interface BlackJackGameRepository extends JpaRepository<BlackJackGameEntity, Long> {
} }

View file

@ -7,7 +7,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.Random; import java.util.Random;
@Service @Service

View file

@ -8,7 +8,6 @@ import de.szut.casino.deposit.dto.AmountDto;
import de.szut.casino.deposit.dto.SessionIdDto; import de.szut.casino.deposit.dto.SessionIdDto;
import de.szut.casino.user.UserEntity; import de.szut.casino.user.UserEntity;
import de.szut.casino.user.UserRepository; import de.szut.casino.user.UserRepository;
import de.szut.casino.user.UserService;
import de.szut.casino.user.dto.KeycloakUserDto; import de.szut.casino.user.dto.KeycloakUserDto;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -16,7 +15,10 @@ import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import java.util.Optional; import java.util.Optional;

View file

@ -5,7 +5,6 @@ import jakarta.persistence.*;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Setter @Setter

View file

@ -7,7 +7,6 @@ import de.szut.casino.user.UserEntity;
import de.szut.casino.user.UserRepository; import de.szut.casino.user.UserRepository;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Objects;
import java.util.Optional; import java.util.Optional;
@Service @Service

View file

@ -1,26 +1,21 @@
package de.szut.casino.deposit; package de.szut.casino.deposit;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.stripe.Stripe; import com.stripe.Stripe;
import com.stripe.exception.SignatureVerificationException;
import com.stripe.exception.StripeException; import com.stripe.exception.StripeException;
import com.stripe.model.*; import com.stripe.model.Event;
import com.stripe.model.checkout.Session; import com.stripe.model.checkout.Session;
import com.stripe.net.Webhook; import com.stripe.net.Webhook;
import com.stripe.param.checkout.SessionRetrieveParams;
import de.szut.casino.user.UserEntity;
import de.szut.casino.user.UserRepository;
import jakarta.annotation.PostConstruct; import jakarta.annotation.PostConstruct;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.Objects; import java.util.Objects;
import java.util.Optional;
@RestController @RestController
public class WebhookController { public class WebhookController {

View file

@ -1,15 +1,9 @@
package de.szut.casino.lootboxes; package de.szut.casino.lootboxes;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import de.szut.casino.blackjack.CardEntity;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.hibernate.annotations.SQLRestriction;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,7 +1,6 @@
package de.szut.casino.lootboxes; package de.szut.casino.lootboxes;
import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import jakarta.persistence.*; import jakarta.persistence.*;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;

View file

@ -1,14 +1,14 @@
package de.szut.casino.user; package de.szut.casino.user;
import de.szut.casino.user.dto.CreateUserDto;
import de.szut.casino.user.dto.GetUserDto;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import de.szut.casino.user.dto.CreateUserDto;
import de.szut.casino.user.dto.GetUserDto;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
@RestController @RestController

View file

@ -1,7 +1,5 @@
package de.szut.casino.user.transaction; package de.szut.casino.user.transaction;
import de.szut.casino.deposit.TransactionEntity;
import de.szut.casino.user.transaction.dto.GetTransactionDto;
import de.szut.casino.user.transaction.dto.UserTransactionsDto; import de.szut.casino.user.transaction.dto.UserTransactionsDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
@ -10,8 +8,6 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController @RestController
public class TransactionController { public class TransactionController {

View file

@ -6,7 +6,7 @@ import { routes } from './app.routes';
import { provideHttpClient, withInterceptors } from '@angular/common/http'; import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async'; import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { OAuthStorage, provideOAuthClient } from 'angular-oauth2-oidc'; import { OAuthStorage, provideOAuthClient } from 'angular-oauth2-oidc';
import { httpInterceptor } from './shared/interceptor/http.interceptor'; import { httpInterceptor } from '@shared/interceptor/http.interceptor';
export const appConfig: ApplicationConfig = { export const appConfig: ApplicationConfig = {
providers: [ providers: [

View file

@ -1,18 +1,18 @@
import { import {
AfterViewInit,
ChangeDetectionStrategy, ChangeDetectionStrategy,
ChangeDetectorRef,
Component, Component,
ElementRef, ElementRef,
EventEmitter, EventEmitter,
inject, inject,
Input, Input,
OnChanges,
OnDestroy,
OnInit, OnInit,
Output, Output,
ViewChild,
AfterViewInit,
OnDestroy,
OnChanges,
SimpleChanges, SimpleChanges,
ChangeDetectorRef, ViewChild,
} from '@angular/core'; } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { loadStripe, Stripe } from '@stripe/stripe-js'; import { loadStripe, Stripe } from '@stripe/stripe-js';

View file

@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, inject, signal, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { PlayingCardComponent } from './components/playing-card/playing-card.component'; import { PlayingCardComponent } from './components/playing-card/playing-card.component';
@ -6,7 +6,7 @@ import { DealerHandComponent } from './components/dealer-hand/dealer-hand.compon
import { PlayerHandComponent } from './components/player-hand/player-hand.component'; import { PlayerHandComponent } from './components/player-hand/player-hand.component';
import { GameControlsComponent } from './components/game-controls/game-controls.component'; import { GameControlsComponent } from './components/game-controls/game-controls.component';
import { GameInfoComponent } from './components/game-info/game-info.component'; import { GameInfoComponent } from './components/game-info/game-info.component';
import { Card, BlackjackGame } from '@blackjack/models/blackjack.model'; import { BlackjackGame, Card } from '@blackjack/models/blackjack.model';
import { BlackjackService } from '@blackjack/services/blackjack.service'; import { BlackjackService } from '@blackjack/services/blackjack.service';
import { HttpErrorResponse } from '@angular/common/http'; import { HttpErrorResponse } from '@angular/common/http';
import { GameResultComponent } from '@blackjack/components/game-result/game-result.component'; import { GameResultComponent } from '@blackjack/components/game-result/game-result.component';

View file

@ -1,12 +1,12 @@
import { import {
AfterViewInit,
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
ElementRef,
Input, Input,
OnChanges, OnChanges,
SimpleChanges, SimpleChanges,
ElementRef,
ViewChild, ViewChild,
AfterViewInit,
} from '@angular/core'; } from '@angular/core';
import { CommonModule, CurrencyPipe } from '@angular/common'; import { CommonModule, CurrencyPipe } from '@angular/common';
import { CountUp } from 'countup.js'; import { CountUp } from 'countup.js';

View file

@ -5,8 +5,8 @@ import {
Input, Input,
OnChanges, OnChanges,
Output, Output,
SimpleChanges,
signal, signal,
SimpleChanges,
} from '@angular/core'; } from '@angular/core';
import { CommonModule, CurrencyPipe } from '@angular/common'; import { CommonModule, CurrencyPipe } from '@angular/common';
import { FormGroup, ReactiveFormsModule } from '@angular/forms'; import { FormGroup, ReactiveFormsModule } from '@angular/forms';

View file

@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, Input, Output, EventEmitter } from '@angular/core'; import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { CommonModule, CurrencyPipe } from '@angular/common'; import { CommonModule, CurrencyPipe } from '@angular/common';
import { animate, style, transition, trigger } from '@angular/animations'; import { animate, style, transition, trigger } from '@angular/animations';
import { GameState } from '../../enum/gameState'; import { GameState } from '../../enum/gameState';

View file

@ -1,9 +1,9 @@
import { import {
AfterViewInit,
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
Input,
AfterViewInit,
ElementRef, ElementRef,
Input,
OnChanges, OnChanges,
SimpleChanges, SimpleChanges,
} from '@angular/core'; } from '@angular/core';

View file

@ -1,6 +1,6 @@
import { Injectable, inject } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Observable, catchError } from 'rxjs'; import { catchError, Observable } from 'rxjs';
import { BlackjackGame } from '@blackjack/models/blackjack.model'; import { BlackjackGame } from '@blackjack/models/blackjack.model';
@Injectable({ @Injectable({

View file

@ -91,9 +91,6 @@
[isOpen]="isTransactionModalOpen" [isOpen]="isTransactionModalOpen"
(closeEventEmitter)="closeTransactionModal()" (closeEventEmitter)="closeTransactionModal()"
/> />
<button class="bg-deep-blue-light hover:bg-deep-blue-contrast w-full py-2 rounded">
Kontoeinstellungen
</button>
</div> </div>
</div> </div>

View file

@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, OnInit, OnDestroy } from '@angular/core'; import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core';
import { NgFor } from '@angular/common'; import { NgFor } from '@angular/common';
import { NavbarComponent } from '@shared/components/navbar/navbar.component'; import { NavbarComponent } from '@shared/components/navbar/navbar.component';

View file

@ -1,5 +1,4 @@
export interface Transaction { export interface Transaction {
id: string;
status: string; status: string;
amount: number; amount: number;
createdAt: string; createdAt: string;

View file

@ -1,12 +1,12 @@
import { import {
AfterViewInit,
Component, Component,
ElementRef, ElementRef,
EventEmitter, EventEmitter,
Input, Input,
OnDestroy,
Output, Output,
ViewChild, ViewChild,
AfterViewInit,
OnDestroy,
} from '@angular/core'; } from '@angular/core';
import { ModalAnimationService } from '@shared/services/modal-animation.service'; import { ModalAnimationService } from '@shared/services/modal-animation.service';
import gsap from 'gsap'; import gsap from 'gsap';

View file

@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { faMoneyBillTransfer, faCreditCard, faWallet } from '@fortawesome/free-solid-svg-icons'; import { faCreditCard, faMoneyBillTransfer, faWallet } from '@fortawesome/free-solid-svg-icons';
import { faPaypal, faGooglePay, faApplePay } from '@fortawesome/free-brands-svg-icons'; import { faApplePay, faGooglePay, faPaypal } from '@fortawesome/free-brands-svg-icons';
@Component({ @Component({
selector: 'app-footer', selector: 'app-footer',

View file

@ -2,8 +2,8 @@ import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
inject, inject,
OnInit,
OnDestroy, OnDestroy,
OnInit,
signal, signal,
} from '@angular/core'; } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';