From 19e229313819ac074e6aee6f611b6dc1042084c2 Mon Sep 17 00:00:00 2001 From: alikia2x Date: Mon, 22 Sep 2025 23:02:02 +0800 Subject: [PATCH] add: the description of 2 endpoints in backend --- packages/elysia/routes/root/index.ts | 3 ++- packages/elysia/routes/song/info.ts | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/elysia/routes/root/index.ts b/packages/elysia/routes/root/index.ts index a76bc76..f2eafb6 100644 --- a/packages/elysia/routes/root/index.ts +++ b/packages/elysia/routes/root/index.ts @@ -53,7 +53,8 @@ export const rootHandler = new Elysia().get( }, detail: { summary: "Root route", - description: "" + description: "The root path. It returns a JSON object containing a random virtual singer, \ + backend version, current server time and other miscellaneous information." } } ); diff --git a/packages/elysia/routes/song/info.ts b/packages/elysia/routes/song/info.ts index 1b19684..26c7ae3 100644 --- a/packages/elysia/routes/song/info.ts +++ b/packages/elysia/routes/song/info.ts @@ -88,7 +88,11 @@ export const getSongInfoHandler = new Elysia({ prefix: "/song" }).get( }, detail: { summary: "Get information of a song", - description: "" + description: "This endpoint retrieves detailed information about a song using its unique ID, \ + which can be provided in several formats. \ + The endpoint accepts a song ID in either a numerical format as the internal ID in our database\ + or as a bilibili video ID (either av or BV format). \ + It responds with the song's name, bilibili ID (av), producer, duration, and associated singers." } } );