Chore:
Moved to Angular 16 Moved to FastAPI 0.100.0 Moved to pydantic 2.0
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Resolve } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Device } from '../core/device';
|
||||
@ -9,7 +8,7 @@ import { DeviceService } from './device.service';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DeviceListResolver implements Resolve<Device[]> {
|
||||
export class DeviceListResolver {
|
||||
constructor(private ser: DeviceService) {}
|
||||
|
||||
resolve(): Observable<Device[]> {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Device } from '../core/device';
|
||||
@ -9,7 +9,7 @@ import { DeviceService } from './device.service';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DeviceResolver implements Resolve<Device> {
|
||||
export class DeviceResolver {
|
||||
constructor(private ser: DeviceService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<Device> {
|
||||
|
||||
@ -13,7 +13,10 @@ const serviceName = 'DeviceService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DeviceService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
|
||||
get(id: string | null): Observable<Device> {
|
||||
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;
|
||||
|
||||
Reference in New Issue
Block a user