diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-01-27 01:40:42 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-01-31 03:36:39 +0800 |
commit | 44162811bd57afb89e5d052a2d9db25007cc1463 (patch) | |
tree | 44a02e5ec79a097ce2105eef04ab6accddd5d1f4 /packages/testnet-faucets/src/ts/server.ts | |
parent | 2bcb7d56394c43acd68d1823092de2ad047abc6d (diff) | |
download | dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.tar dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.tar.gz dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.tar.bz2 dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.tar.lz dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.tar.xz dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.tar.zst dexon-sol-tools-44162811bd57afb89e5d052a2d9db25007cc1463.zip |
Add order signing and dispensing ability to faucet
Diffstat (limited to 'packages/testnet-faucets/src/ts/server.ts')
-rw-r--r-- | packages/testnet-faucets/src/ts/server.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/testnet-faucets/src/ts/server.ts b/packages/testnet-faucets/src/ts/server.ts index 26edfff5a..38c2f1428 100644 --- a/packages/testnet-faucets/src/ts/server.ts +++ b/packages/testnet-faucets/src/ts/server.ts @@ -3,6 +3,7 @@ import * as express from 'express'; import { errorReporter } from './error_reporter'; import { Handler } from './handler'; +import { parameterExtractor } from './parameter_extractor'; // Setup the errorReporter to catch uncaught exceptions and unhandled rejections errorReporter.setup(); @@ -20,8 +21,10 @@ app.get('/ping', (req: express.Request, res: express.Response) => { res.status(200).send('pong'); }); app.get('/info', handler.getQueueInfo.bind(handler)); -app.get('/ether/:recipient', handler.dispenseEther.bind(handler)); -app.get('/zrx/:recipient', handler.dispenseZRX.bind(handler)); +app.get('/ether/:recipient', parameterExtractor.extract, handler.dispenseEther.bind(handler)); +app.get('/zrx/:recipient', parameterExtractor.extract, handler.dispenseZRX.bind(handler)); +app.get('/order/weth/:recipient', parameterExtractor.extract, handler.dispenseWETHOrder.bind(handler)); +app.get('/order/zrx/:recipient', parameterExtractor.extract, handler.dispenseZRXOrder.bind(handler)); // Log to rollbar any errors unhandled by handlers app.use(errorReporter.errorHandler()); |