refactor(services): migrate user and applications services to auth domain
Update _apiDomain in UserService (/cms → /auth) and ApplicationsService (/skydive → /auth) following the backend route reorganization. fix(calculator): use nullish coalescing for currentUser.poids to preserve default weight when no skydiver profile exists docs: update README
This commit is contained in:
@@ -144,7 +144,7 @@ export class CalculatorComponent implements OnInit, OnDestroy {
|
|||||||
lastjump$.subscribe((jump) => {
|
lastjump$.subscribe((jump) => {
|
||||||
this.lastjump = jump;
|
this.lastjump = jump;
|
||||||
this.inputs.jumps = jump.numero;
|
this.inputs.jumps = jump.numero;
|
||||||
this.inputs.weight = this.currentUser.poids!;
|
this.inputs.weight = this.currentUser.poids ?? this.inputs.weight;
|
||||||
this.inputs.current = jump.taille!;
|
this.inputs.current = jump.taille!;
|
||||||
this.canopy_size_table = new MatTableDataSource<WeightSize>(weightSizes);
|
this.canopy_size_table = new MatTableDataSource<WeightSize>(weightSizes);
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { map } from 'rxjs/operators';
|
|||||||
export class ApplicationsService {
|
export class ApplicationsService {
|
||||||
private apiService = inject(ApiService);
|
private apiService = inject(ApiService);
|
||||||
|
|
||||||
private _apiDomain = '/skydive';
|
private _apiDomain = '/auth';
|
||||||
|
|
||||||
query(config: ApplicationListConfig): Observable<ApplicationList> {
|
query(config: ApplicationListConfig): Observable<ApplicationList> {
|
||||||
// Convert any filters over to Angular's URLSearchParams
|
// Convert any filters over to Angular's URLSearchParams
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export class UserService implements OnDestroy {
|
|||||||
private isAuthenticatedSubject = new ReplaySubject<boolean>(1);
|
private isAuthenticatedSubject = new ReplaySubject<boolean>(1);
|
||||||
public isAuthenticated = this.isAuthenticatedSubject.asObservable();
|
public isAuthenticated = this.isAuthenticatedSubject.asObservable();
|
||||||
|
|
||||||
private _apiDomain = '/cms';
|
private _apiDomain = '/auth';
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this._subcriptions.forEach((subscription: Subscription) => subscription.unsubscribe());
|
this._subcriptions.forEach((subscription: Subscription) => subscription.unsubscribe());
|
||||||
|
|||||||
+2647
-1123
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user