diff --git a/lib/routes/coomer/index.ts b/lib/routes/coomer/index.ts index 778b6135b..7b7c242e9 100644 --- a/lib/routes/coomer/index.ts +++ b/lib/routes/coomer/index.ts @@ -53,7 +53,7 @@ async function handler(ctx) { const rootUrl = 'https://coomer.st'; const apiUrl = `${rootUrl}/api/v1`; - const currentUrl = isPosts ? `${apiUrl}/posts` : `${apiUrl}/${source}/user/${id}`; + const currentUrl = isPosts ? `${apiUrl}/posts` : `${apiUrl}/${source}/user/${id}/posts`; const headers = { cookie: '__ddg2=sBQ4uaaGecmfEUk7', @@ -66,7 +66,7 @@ async function handler(ctx) { }); const responseData = isPosts ? response.data.posts : response.data; - const author = isPosts ? '' : await getAuthor(currentUrl, headers); + const author = isPosts ? '' : await getAuthor(`${apiUrl}/${source}/user/${id}`, headers); const title = isPosts ? 'Coomer Posts' : `Posts of ${author} from ${source} | Coomer`; const image = isPosts ? `${rootUrl}/favicon.ico` : `https://img.coomer.st/icons/${source}/${id}`; const items = responseData diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index e67c5dad2..8d1b67ba0 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -94,7 +94,7 @@ function buildApiUrl(source: string, userId?: string, contentType?: string): str } const basePath = `${KEMONO_API_URL}/${source}/user/${userId}`; - return contentType ? `${basePath}/${contentType}` : basePath; + return contentType ? `${basePath}/${contentType}` : `${basePath}/posts`; } function buildFrontendUrl(source: string, userId?: string, contentType?: string): string {