Skip to content

Commit

Permalink
Merge pull request #484 from bandada-infra/fix/api-sdk
Browse files Browse the repository at this point in the history
Avoid wrong `return` in removeGroup(s) API SDK methods
  • Loading branch information
vplasencia authored Apr 9, 2024
2 parents 8f577a6 + 61df1cd commit d2cd8d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions libs/api-sdk/src/apiSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default class ApiSdk {
* @returns undefined.
*/
async removeGroup(groupId: string, apiKey: string): Promise<void> {
return removeGroup(this._config, groupId, apiKey)
await removeGroup(this._config, groupId, apiKey)
}

/**
Expand All @@ -140,7 +140,7 @@ export default class ApiSdk {
* @returns undefined.
*/
async removeGroups(groupIds: Array<string>, apiKey: string): Promise<void> {
return removeGroups(this._config, groupIds, apiKey)
await removeGroups(this._config, groupIds, apiKey)
}

/**
Expand Down
8 changes: 2 additions & 6 deletions libs/api-sdk/src/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ export async function removeGroup(

newConfig.headers["x-api-key"] = apiKey

const req = await request(requestUrl, newConfig)

return req
await request(requestUrl, newConfig)
}

/**
Expand All @@ -86,9 +84,7 @@ export async function removeGroups(

newConfig.headers["x-api-key"] = apiKey

const req = await request(url, newConfig)

return req
await request(url, newConfig)
}

/**
Expand Down

0 comments on commit d2cd8d4

Please sign in to comment.