Changed the for-product route to for-sku to reduce ambiguity
This commit is contained in:
@ -190,7 +190,7 @@ def show_list(
|
|||||||
return modifier_categories
|
return modifier_categories
|
||||||
|
|
||||||
|
|
||||||
@router.get("/for-product/{sku_id}")
|
@router.get("/for-sku/{sku_id}")
|
||||||
def for_product(
|
def for_product(
|
||||||
sku_id: uuid.UUID,
|
sku_id: uuid.UUID,
|
||||||
date_: date = Depends(effective_date),
|
date_: date = Depends(effective_date),
|
||||||
|
|||||||
@ -32,9 +32,9 @@ export class ModifierCategoryService {
|
|||||||
.pipe(catchError(this.log.handleError(serviceName, 'list'))) as Observable<ModifierCategory[]>;
|
.pipe(catchError(this.log.handleError(serviceName, 'list'))) as Observable<ModifierCategory[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
listForSku(id: string): Observable<ModifierCategory[]> {
|
listForSku(sku_id: string): Observable<ModifierCategory[]> {
|
||||||
return this.http
|
return this.http
|
||||||
.get<ModifierCategory[]>(`${url}/for-product/${id}`)
|
.get<ModifierCategory[]>(`${url}/for-sku/${sku_id}`)
|
||||||
.pipe(catchError(this.log.handleError(serviceName, 'listForSku'))) as Observable<ModifierCategory[]>;
|
.pipe(catchError(this.log.handleError(serviceName, 'listForSku'))) as Observable<ModifierCategory[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user