From f4ae9391248d9ba366210be215681537ce9ecb49 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 24 Feb 2019 17:57:49 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=95=E3=83=B3=E3=81=AB?= =?UTF-8?q?=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drive/files/{attached_notes.ts => attached-notes.ts} | 0 .../drive/files/{check_existence.ts => check-existence.ts} | 0 .../drive/files/{upload_from_url.ts => upload-from-url.ts} | 0 .../endpoints/i/{authorized_apps.ts => authorized-apps.ts} | 0 .../endpoints/i/{change_password.ts => change-password.ts} | 0 ...l_messaging_messages.ts => read-all-messaging-messages.ts} | 0 .../i/{read_all_unread_notes.ts => read-all-unread-notes.ts} | 0 .../endpoints/i/{regenerate_token.ts => regenerate-token.ts} | 0 .../api/endpoints/i/{signin_history.ts => signin-history.ts} | 0 .../i/{update_client_setting.ts => update-client-setting.ts} | 0 .../api/endpoints/i/{update_email.ts => update-email.ts} | 0 src/server/api/endpoints/i/{update_home.ts => update-home.ts} | 0 .../i/{update_mobile_home.ts => update-mobile-home.ts} | 0 .../api/endpoints/i/{update_widget.ts => update-widget.ts} | 0 .../endpoints/notes/{search_by_tag.ts => search-by-tag.ts} | 0 .../{mark_all_as_read.ts => mark-all-as-read.ts} | 0 ...ently_replied_users.ts => get-frequently-replied-users.ts} | 0 src/server/api/index.ts | 4 ++++ 18 files changed, 4 insertions(+) rename src/server/api/endpoints/drive/files/{attached_notes.ts => attached-notes.ts} (100%) rename src/server/api/endpoints/drive/files/{check_existence.ts => check-existence.ts} (100%) rename src/server/api/endpoints/drive/files/{upload_from_url.ts => upload-from-url.ts} (100%) rename src/server/api/endpoints/i/{authorized_apps.ts => authorized-apps.ts} (100%) rename src/server/api/endpoints/i/{change_password.ts => change-password.ts} (100%) rename src/server/api/endpoints/i/{read_all_messaging_messages.ts => read-all-messaging-messages.ts} (100%) rename src/server/api/endpoints/i/{read_all_unread_notes.ts => read-all-unread-notes.ts} (100%) rename src/server/api/endpoints/i/{regenerate_token.ts => regenerate-token.ts} (100%) rename src/server/api/endpoints/i/{signin_history.ts => signin-history.ts} (100%) rename src/server/api/endpoints/i/{update_client_setting.ts => update-client-setting.ts} (100%) rename src/server/api/endpoints/i/{update_email.ts => update-email.ts} (100%) rename src/server/api/endpoints/i/{update_home.ts => update-home.ts} (100%) rename src/server/api/endpoints/i/{update_mobile_home.ts => update-mobile-home.ts} (100%) rename src/server/api/endpoints/i/{update_widget.ts => update-widget.ts} (100%) rename src/server/api/endpoints/notes/{search_by_tag.ts => search-by-tag.ts} (100%) rename src/server/api/endpoints/notifications/{mark_all_as_read.ts => mark-all-as-read.ts} (100%) rename src/server/api/endpoints/users/{get_frequently_replied_users.ts => get-frequently-replied-users.ts} (100%) diff --git a/src/server/api/endpoints/drive/files/attached_notes.ts b/src/server/api/endpoints/drive/files/attached-notes.ts similarity index 100% rename from src/server/api/endpoints/drive/files/attached_notes.ts rename to src/server/api/endpoints/drive/files/attached-notes.ts diff --git a/src/server/api/endpoints/drive/files/check_existence.ts b/src/server/api/endpoints/drive/files/check-existence.ts similarity index 100% rename from src/server/api/endpoints/drive/files/check_existence.ts rename to src/server/api/endpoints/drive/files/check-existence.ts diff --git a/src/server/api/endpoints/drive/files/upload_from_url.ts b/src/server/api/endpoints/drive/files/upload-from-url.ts similarity index 100% rename from src/server/api/endpoints/drive/files/upload_from_url.ts rename to src/server/api/endpoints/drive/files/upload-from-url.ts diff --git a/src/server/api/endpoints/i/authorized_apps.ts b/src/server/api/endpoints/i/authorized-apps.ts similarity index 100% rename from src/server/api/endpoints/i/authorized_apps.ts rename to src/server/api/endpoints/i/authorized-apps.ts diff --git a/src/server/api/endpoints/i/change_password.ts b/src/server/api/endpoints/i/change-password.ts similarity index 100% rename from src/server/api/endpoints/i/change_password.ts rename to src/server/api/endpoints/i/change-password.ts diff --git a/src/server/api/endpoints/i/read_all_messaging_messages.ts b/src/server/api/endpoints/i/read-all-messaging-messages.ts similarity index 100% rename from src/server/api/endpoints/i/read_all_messaging_messages.ts rename to src/server/api/endpoints/i/read-all-messaging-messages.ts diff --git a/src/server/api/endpoints/i/read_all_unread_notes.ts b/src/server/api/endpoints/i/read-all-unread-notes.ts similarity index 100% rename from src/server/api/endpoints/i/read_all_unread_notes.ts rename to src/server/api/endpoints/i/read-all-unread-notes.ts diff --git a/src/server/api/endpoints/i/regenerate_token.ts b/src/server/api/endpoints/i/regenerate-token.ts similarity index 100% rename from src/server/api/endpoints/i/regenerate_token.ts rename to src/server/api/endpoints/i/regenerate-token.ts diff --git a/src/server/api/endpoints/i/signin_history.ts b/src/server/api/endpoints/i/signin-history.ts similarity index 100% rename from src/server/api/endpoints/i/signin_history.ts rename to src/server/api/endpoints/i/signin-history.ts diff --git a/src/server/api/endpoints/i/update_client_setting.ts b/src/server/api/endpoints/i/update-client-setting.ts similarity index 100% rename from src/server/api/endpoints/i/update_client_setting.ts rename to src/server/api/endpoints/i/update-client-setting.ts diff --git a/src/server/api/endpoints/i/update_email.ts b/src/server/api/endpoints/i/update-email.ts similarity index 100% rename from src/server/api/endpoints/i/update_email.ts rename to src/server/api/endpoints/i/update-email.ts diff --git a/src/server/api/endpoints/i/update_home.ts b/src/server/api/endpoints/i/update-home.ts similarity index 100% rename from src/server/api/endpoints/i/update_home.ts rename to src/server/api/endpoints/i/update-home.ts diff --git a/src/server/api/endpoints/i/update_mobile_home.ts b/src/server/api/endpoints/i/update-mobile-home.ts similarity index 100% rename from src/server/api/endpoints/i/update_mobile_home.ts rename to src/server/api/endpoints/i/update-mobile-home.ts diff --git a/src/server/api/endpoints/i/update_widget.ts b/src/server/api/endpoints/i/update-widget.ts similarity index 100% rename from src/server/api/endpoints/i/update_widget.ts rename to src/server/api/endpoints/i/update-widget.ts diff --git a/src/server/api/endpoints/notes/search_by_tag.ts b/src/server/api/endpoints/notes/search-by-tag.ts similarity index 100% rename from src/server/api/endpoints/notes/search_by_tag.ts rename to src/server/api/endpoints/notes/search-by-tag.ts diff --git a/src/server/api/endpoints/notifications/mark_all_as_read.ts b/src/server/api/endpoints/notifications/mark-all-as-read.ts similarity index 100% rename from src/server/api/endpoints/notifications/mark_all_as_read.ts rename to src/server/api/endpoints/notifications/mark-all-as-read.ts diff --git a/src/server/api/endpoints/users/get_frequently_replied_users.ts b/src/server/api/endpoints/users/get-frequently-replied-users.ts similarity index 100% rename from src/server/api/endpoints/users/get_frequently_replied_users.ts rename to src/server/api/endpoints/users/get-frequently-replied-users.ts 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)); } }