aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src/index.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-09-28 04:53:37 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:12:18 +0800
commit2a133f2c551ac9706c6ed2b5deadda4bc4c63832 (patch)
tree7f5ddd205c82a10992d105846bf3297505172b05 /packages/pipeline/src/index.ts
parent4570bc2729cef550bacd168928ce1206ee06d3c2 (diff)
downloaddexon-0x-contracts-2a133f2c551ac9706c6ed2b5deadda4bc4c63832.tar.gz
dexon-0x-contracts-2a133f2c551ac9706c6ed2b5deadda4bc4c63832.tar.zst
dexon-0x-contracts-2a133f2c551ac9706c6ed2b5deadda4bc4c63832.zip
Add soruceUrl to SraOrder entity
Diffstat (limited to 'packages/pipeline/src/index.ts')
-rw-r--r--packages/pipeline/src/index.ts4
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`);