import { Injectable } from '@angular/core' ; import { HttpClient } from '@angular/common/http' ; import { IProductVariantPrice } from '@gauzy/contracts' ; import { firstValueFrom } from 'rxjs' ; import { API_PREFIX } from '../constants/app.constants' ; @ Injectable ( ) export class ProductVariantPriceService { PRODUCT_VARIANT_PRICE_URL = `${ API_PREFIX }/product-variant-prices` ; constructor ( private http ) { } updateProductVariantPrice ( productVariantPrice ) { return firstValueFrom ( this . http . put < IProductVariantPrice > ( `${ this . PRODUCT_VARIANT_PRICE_URL }/${ productVariantPrice . id }` , productVariantPrice ) ) ; } }