diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-14 20:45:37 +0900 |
|---|---|---|
| committer | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2017-04-14 20:45:37 +0900 |
| commit | b095efaee59572800244b34564692fd999cc4ded (patch) | |
| tree | 89a2a1401b2af797bb687d0d79cfb5e9e52d987e /src/api/server.ts | |
| parent | Fix tslint.json (diff) | |
| download | sharkey-b095efaee59572800244b34564692fd999cc4ded.tar.gz sharkey-b095efaee59572800244b34564692fd999cc4ded.tar.bz2 sharkey-b095efaee59572800244b34564692fd999cc4ded.zip | |
Migrate to tslint 5.1.0
Diffstat (limited to 'src/api/server.ts')
| -rw-r--r-- | src/api/server.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/server.ts b/src/api/server.ts index 0b30222d38..0e059f5d2e 100644 --- a/src/api/server.ts +++ b/src/api/server.ts @@ -34,10 +34,10 @@ app.get('/', (req, res) => { */ endpoints.forEach(endpoint => endpoint.withFile ? - app.post('/' + endpoint.name, + app.post(`/${endpoint.name}`, endpoint.withFile ? multer({ dest: 'uploads/' }).single('file') : null, require('./api-handler').default.bind(null, endpoint)) : - app.post('/' + endpoint.name, + app.post(`/${endpoint.name}`, require('./api-handler').default.bind(null, endpoint)) ); |