Skip to content

Commit

Permalink
PP-11681 Fix linting errors.
Browse files Browse the repository at this point in the history
- Fix linting error during build - "Redundant use of `await` on a return value.
- Remove redundant spaces.
  • Loading branch information
JFSGDS committed Feb 27, 2024
1 parent 62898f4 commit 8482885
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/services/clients/products.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = {
* @returns {Promise<Product>}
*/
async function createProduct (options) {
const body = {
const body = {
gateway_account_id: options.gatewayAccountId,
pay_api_token: options.payApiToken,
name: options.name,
Expand Down Expand Up @@ -142,19 +142,21 @@ 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
}

/**
* @param {String} gatewayAccountId: the id of the gateway account whose service the product belongs to
* @param {String} productExternalId: the external id of the product you wish to delete
* @returns Promise<undefined>
*/
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
Expand Down

0 comments on commit 8482885

Please sign in to comment.