From 8482885f6bad25c7cbc7cb075dfd5beb17c5d54a Mon Sep 17 00:00:00 2001 From: John Shields Date: Tue, 27 Feb 2024 16:58:21 +0000 Subject: [PATCH] PP-11681 Fix linting errors. - Fix linting error during build - "Redundant use of `await` on a return value. - Remove redundant spaces. --- app/services/clients/products.client.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/services/clients/products.client.js b/app/services/clients/products.client.js index f1737c8fd9..c4ded5f4af 100644 --- a/app/services/clients/products.client.js +++ b/app/services/clients/products.client.js @@ -47,7 +47,7 @@ module.exports = { * @returns {Promise} */ async function createProduct (options) { - const body = { + const body = { gateway_account_id: options.gatewayAccountId, pay_api_token: options.payApiToken, name: options.name, @@ -142,7 +142,8 @@ async function disableProduct (gatewayAccountId, productExternalId) { this.client = new Client(SERVICE_NAME) const url = `${baseUrl}/gateway-account/${gatewayAccountId}/products/${productExternalId}/disable` configureClient(this.client, url) - return await this.client.patch(url, 'disable a product') + const response = await this.client.patch(url, 'disable a product') + return response } /** @@ -150,11 +151,12 @@ async function disableProduct (gatewayAccountId, productExternalId) { * @param {String} productExternalId: the external id of the product you wish to delete * @returns Promise */ -async function deleteProduct (gatewayAccountId, productExternalId) { +async function deleteProduct (gatewayAccountId, productExternalId) { this.client = new Client(SERVICE_NAME) const url = `${baseUrl}/gateway-account/${gatewayAccountId}/products/${productExternalId}` configureClient(this.client, url) - return await this.client.delete(url, 'disable a product') + const response = await this.client.delete(url, 'disable a product') + return response } // PAYMENT