From da2631822f902094e691143302d6fc6b68e1cf56 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Wed, 24 May 2023 20:18:00 -0600 Subject: Añade lógica de carrito MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clients/api_client.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/clients/api_client.ts') diff --git a/src/clients/api_client.ts b/src/clients/api_client.ts index 81ae482..e544f16 100644 --- a/src/clients/api_client.ts +++ b/src/clients/api_client.ts @@ -44,6 +44,14 @@ export class ApiClient { return response } + async del(path: string) { + const request_url = `${ this.url }${ path }`; + const options = this.authorizationHeaders(); + + const response = await axios.delete(request_url, options); + return response; + } + async getProduct(id: string) { const request_url = `${ this.url }/products/${ id }`; const [product_response, product_reviews] = await Promise.all([ -- cgit v1.2.3