Moved to Angular 16
Moved to FastAPI 0.100.0
Moved to pydantic 2.0
This commit is contained in:
tanshu committed 2023-07-22 09:20:01 +05:30
1 parent 8b2d15b9e1
commit 09b762d154
161 files changed
+693 -753

No files matched your search

@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Resolve, Router } from '@angular/router';
import { Router } from '@angular/router';
import { Observable } from 'rxjs';
import { Role } from './role';
@@ -8,8 +8,11 @@ import { RoleService } from './role.service';
@Injectable({
providedIn: 'root',
})
export class RoleListResolver implements Resolve<Role[]> {
constructor(private ser: RoleService, private router: Router) {}
export class RoleListResolver {
constructor(
private ser: RoleService,
private router: Router,
) {}
resolve(): Observable<Role[]> {
return this.ser.list();
@@ -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 { Role } from './role';
@@ -8,7 +8,7 @@ import { RoleService } from './role.service';
@Injectable({
providedIn: 'root',
})
export class RoleResolver implements Resolve<Role> {
export class RoleResolver {
constructor(private ser: RoleService) {}
resolve(route: ActivatedRouteSnapshot): Observable<Role> {
+4 -1
View File
@@ -17,7 +17,10 @@ const serviceName = 'RoleService';
providedIn: 'root',
})
export class RoleService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
constructor(
private http: HttpClient,
private log: ErrorLoggerService,
) {}
get(id: string | null): Observable<Role> {
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;