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)); } }