style: format code

This commit is contained in:
Phan Huy Tran 2025-05-21 10:42:36 +02:00 committed by Phan Huy Tran
commit f2aa81b6d2
5 changed files with 274 additions and 221 deletions

View file

@ -1,17 +1,17 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { DiceDto, DiceResult } from './dice.model';
@Injectable({
providedIn: 'root'
})
export class DiceService {
private apiUrl = '/backend/dice';
constructor(private http: HttpClient) { }
rollDice(diceDto: DiceDto): Observable<DiceResult> {
return this.http.post<DiceResult>(this.apiUrl, diceDto);
}
}
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { DiceDto, DiceResult } from './dice.model';
@Injectable({
providedIn: 'root',
})
export class DiceService {
private apiUrl = '/backend/dice';
constructor(private http: HttpClient) {}
rollDice(diceDto: DiceDto): Observable<DiceResult> {
return this.http.post<DiceResult>(this.apiUrl, diceDto);
}
}