Skip to content

Commit

Permalink
add client id when request
Browse files Browse the repository at this point in the history
  • Loading branch information
domechn committed Oct 7, 2023
1 parent 11053d3 commit ad45400
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/middlelayers/datafetch/currencies/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import _ from 'lodash'
import { CurrencyRate } from '../types'
import { sendHttpRequest } from '../utils/http'
import { getClientID } from '../../../utils/app'

export interface CurrencyRateQuerier {
listAllCurrencyRates(): Promise<CurrencyRate[]>
Expand All @@ -17,7 +18,9 @@ export class ExchangeRate implements CurrencyRateQuerier {
rates: {
[key: string]: number
}
}>("GET", this.queryUrl + currentDate)
}>("GET", this.queryUrl + currentDate, 10000, {
"x-track3-client-id": await getClientID(),
})
if (!resp.success) {
throw new Error("Failed to fetch currency rates")
}
Expand Down

0 comments on commit ad45400

Please sign in to comment.