diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-09-28 04:53:37 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-12-05 06:24:06 +0800 |
commit | dd093daf916ee3d6ce0021be0a245990e0cd2c56 (patch) | |
tree | 37e33899336fb77563d09f196271f23d320de5c8 /packages/pipeline/src/index.ts | |
parent | 9ab55ccec0478e65f9d605aa2da7ed1fa13e01ac (diff) | |
download | dexon-0x-contracts-dd093daf916ee3d6ce0021be0a245990e0cd2c56.tar.gz dexon-0x-contracts-dd093daf916ee3d6ce0021be0a245990e0cd2c56.tar.zst dexon-0x-contracts-dd093daf916ee3d6ce0021be0a245990e0cd2c56.zip |
Add soruceUrl to SraOrder entity
Diffstat (limited to 'packages/pipeline/src/index.ts')
-rw-r--r-- | packages/pipeline/src/index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/pipeline/src/index.ts b/packages/pipeline/src/index.ts index 3e8434e3d..c442c7970 100644 --- a/packages/pipeline/src/index.ts +++ b/packages/pipeline/src/index.ts @@ -47,10 +47,12 @@ async function getSraOrdersAsync(): Promise<void> { const orderRepository = connection.getRepository(SraOrder); console.log(`found ${await orderRepository.count()} existing orders`); - const connect = new HttpClient('https://api.radarrelay.com/0x/v2'); + const sraUrl = 'https://api.radarrelay.com/0x/v2'; + const connect = new HttpClient(sraUrl); const rawOrders = await connect.getOrdersAsync(); const orders = parseSraOrders(rawOrders); for (const order of orders) { + order.sourceUrl = sraUrl; order.save(); } console.log(`now there are ${await orderRepository.count()} total orders`); |