Fix: Username unique index was case sensitive and this allowed duplicate names.

Feature: Moved temporal products into their own module and reverted the products module
This commit is contained in:
2021-10-27 09:27:47 +05:30
parent debe0df7b7
commit 124cf4d9ff
40 changed files with 1522 additions and 313 deletions

View File

@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
import { Observable } from 'rxjs';
import { Product } from '../core/product';
import { TemporalProductService } from './temporal-product.service';
@Injectable({
providedIn: 'root',
})
export class TemporalProductResolverService implements Resolve<Product> {
constructor(private ser: TemporalProductService) {}
resolve(route: ActivatedRouteSnapshot): Observable<Product> {
const id = route.paramMap.get('id');
return this.ser.get(id as string);
}
}