Skip to content

Commit

Permalink
Uses verbose env var to determine response data
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkaseman committed Feb 4, 2021
1 parent 1d834e7 commit 59c150f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coinmarketcap/src/endpoint/dominance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const execute: ExecuteWithConfig<Config> = async (request, config) => {
const response = await Requester.request(options)
const result = Requester.validateResultNumber(response.data, ['data', dataKey])
return Requester.success(jobRunID, {
data: { result },
data: config.verbose ? { ...response.data, result } : { result },
result,
status: 200,
})
Expand Down
2 changes: 1 addition & 1 deletion coinmarketcap/src/endpoint/marketcap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const execute: ExecuteWithConfig<Config> = async (request, config) => {
'total_market_cap',
])
return Requester.success(jobRunID, {
data: { result },
data: config.verbose ? { ...response.data, result } : { result },
result,
status: 200,
})
Expand Down
2 changes: 1 addition & 1 deletion coinmarketcap/src/endpoint/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const execute: ExecuteWithConfig<Config> = async (request, config) => {
const result = Requester.validateResultNumber(response.data, path)

return Requester.success(jobRunID, {
data: { result },
data: config.verbose ? { ...response.data, result } : { result },
result,
status: 200,
})
Expand Down

0 comments on commit 59c150f

Please sign in to comment.