diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-07-25 07:18:50 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-07-25 07:18:50 +0900 |
| commit | dbf335a05dde059ea8a018a7efdac6bc7e04ef95 (patch) | |
| tree | 6b695a3062b534e1535fe108fb2357b5e9642cd5 /src/server/api/index.ts | |
| parent | Update CHANGELOG (diff) | |
| download | sharkey-dbf335a05dde059ea8a018a7efdac6bc7e04ef95.tar.gz sharkey-dbf335a05dde059ea8a018a7efdac6bc7e04ef95.tar.bz2 sharkey-dbf335a05dde059ea8a018a7efdac6bc7e04ef95.zip | |
Refactor: withFile --> requireFile
Diffstat (limited to 'src/server/api/index.ts')
| -rw-r--r-- | src/server/api/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/api/index.ts b/src/server/api/index.ts index e89988efd0..3ec7a28df9 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -35,7 +35,7 @@ const router = new Router(); /** * Register endpoint handlers */ -endpoints.forEach(endpoint => endpoint.meta.withFile +endpoints.forEach(endpoint => endpoint.meta.requireFile ? router.post(`/${endpoint.name}`, upload.single('file'), handler.bind(null, endpoint)) : router.post(`/${endpoint.name}`, handler.bind(null, endpoint)) ); |