fix(route): kemono/discord (#13598)

This commit is contained in:
Kaa 2023-10-21 16:24:38 +00:00 committed by GitHub
parent 7410aaac90
commit b528368f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ module.exports = async (ctx) => {
const id = ctx.params.id;
const rootUrl = 'https://kemono.party';
const apiUrl = `${rootUrl}/api/discord/channels/lookup?q=${id}`;
const apiUrl = `${rootUrl}/api/v1/discord/channel/lookup/${id}`;
const currentUrl = `${rootUrl}/${source ? `${source}/${source === 'discord' ? `server/${id}` : `user/${id}`}` : 'posts'}`;
const headers = {
@ -33,7 +33,7 @@ module.exports = async (ctx) => {
ctx.cache.tryGet(channel.id, async () => {
const channelResponse = await got({
method: 'get',
url: `${rootUrl}/api/discord/channel/${channel.id}?skip=0`,
url: `${rootUrl}/api/v1/discord/channel/${channel.id}?o=0`,
headers,
});