aboutsummaryrefslogtreecommitdiffstats
path: root/packages/testnet-faucets/src/ts/server.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon@0xproject.com>2018-02-07 08:15:25 +0800
committerGitHub <noreply@github.com>2018-02-07 08:15:25 +0800
commit562bcb85710c281d817c7dd4957f0a7db1ddc306 (patch)
tree3a96355adab7a5ee7c9a203ad4247ef356d35668 /packages/testnet-faucets/src/ts/server.ts
parent00c07b38a42c82d7c37835234d7f81236b0342ce (diff)
parentf44bfa9682544a8fc50ef9221991982fd665f9f5 (diff)
downloaddexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.tar
dexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.tar.gz
dexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.tar.bz2
dexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.tar.lz
dexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.tar.xz
dexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.tar.zst
dexon-sol-tools-562bcb85710c281d817c7dd4957f0a7db1ddc306.zip
Merge pull request #352 from 0xProject/feature/testnet-faucets/order-dispenser
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.ts7
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..be1077756 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 { parameterTransformer } from './parameter_transformer';
// 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', parameterTransformer.transform, handler.dispenseEther.bind(handler));
+app.get('/zrx/:recipient', parameterTransformer.transform, handler.dispenseZRX.bind(handler));
+app.get('/order/weth/:recipient', parameterTransformer.transform, handler.dispenseWETHOrder.bind(handler));
+app.get('/order/zrx/:recipient', parameterTransformer.transform, handler.dispenseZRXOrder.bind(handler));
// Log to rollbar any errors unhandled by handlers
app.use(errorReporter.errorHandler());