diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-06 18:31:30 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-06 18:31:30 +0800 |
commit | 271fa26890c7d86fe516b51d653a308b2789d2c2 (patch) | |
tree | eff3a17c8dd56cd1fbe4da76557b904253792cd2 /packages/website/ts/utils/backend_client.ts | |
parent | fe437da7517b4ea8e308a7210a34e66b715d5c78 (diff) | |
parent | cc39eea9991306eabadd912256452f67fb49c20b (diff) | |
download | dexon-0x-contracts-271fa26890c7d86fe516b51d653a308b2789d2c2.tar.gz dexon-0x-contracts-271fa26890c7d86fe516b51d653a308b2789d2c2.tar.zst dexon-0x-contracts-271fa26890c7d86fe516b51d653a308b2789d2c2.zip |
merge v2-prototype
Diffstat (limited to 'packages/website/ts/utils/backend_client.ts')
-rw-r--r-- | packages/website/ts/utils/backend_client.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts index c440b1604..6b16aea6b 100644 --- a/packages/website/ts/utils/backend_client.ts +++ b/packages/website/ts/utils/backend_client.ts @@ -8,6 +8,7 @@ const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station'; const PRICES_ENDPOINT = '/prices'; const RELAYERS_ENDPOINT = '/relayers'; const WIKI_ENDPOINT = '/wiki'; +const SUBSCRIBE_SUBSTACK_NEWSLETTER_ENDPOINT = '/newsletter_subscriber/substack'; export const backendClient = { async getGasInfoAsync(): Promise<WebsiteBackendGasInfo> { @@ -33,4 +34,11 @@ export const backendClient = { const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), WIKI_ENDPOINT); return result; }, + async subscribeToNewsletterAsync(email: string): Promise<Response> { + const result = await fetchUtils.postAsync(utils.getBackendBaseUrl(), SUBSCRIBE_SUBSTACK_NEWSLETTER_ENDPOINT, { + email, + referrer: window.location.href, + }); + return result; + }, }; |