diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-24 17:57:49 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-24 17:57:49 +0900 |
| commit | f4ae9391248d9ba366210be215681537ce9ecb49 (patch) | |
| tree | 28de199e28cf57ea5254da4c1f300e16b3996a5f /src/server/api/index.ts | |
| parent | Refactor (diff) | |
| download | misskey-f4ae9391248d9ba366210be215681537ce9ecb49.tar.gz misskey-f4ae9391248d9ba366210be215681537ce9ecb49.tar.bz2 misskey-f4ae9391248d9ba366210be215681537ce9ecb49.zip | |
ハイフンに統一
Diffstat (limited to 'src/server/api/index.ts')
| -rw-r--r-- | src/server/api/index.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/api/index.ts b/src/server/api/index.ts index 6c523a9d49..fac57ca06e 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -51,6 +51,10 @@ for (const endpoint of endpoints) { if (endpoint.meta.requireFile) { router.post(`/${endpoint.name}`, upload.single('file'), handler.bind(null, endpoint)); } else { + if (endpoint.name.includes('-')) { + // 後方互換性のため + router.post(`/${endpoint.name.replace(/\-/g, '_')}`, handler.bind(null, endpoint)); + } router.post(`/${endpoint.name}`, handler.bind(null, endpoint)); } } |