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:
@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user