mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 10:47:48 +01:00
fix the contunation bug :p
This commit is contained in:
parent
93ffc6ea42
commit
9adc242445
1 changed files with 10 additions and 3 deletions
|
@ -189,9 +189,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
|
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
|
|
||||||
const search = await fetch(
|
const search = await fetch(atob("aHR0cHM6Ly80Z2V0LnN1ZG92YW5pbGxhLm9yZy9hcGkvdjEvd2ViP3M9") + query);
|
||||||
`https://4get.sudovanilla.org/api/v1/web?s=${query}`
|
|
||||||
);
|
|
||||||
const web = getJson(await search.text());
|
const web = getJson(await search.text());
|
||||||
|
|
||||||
if (req.query.lucky === "true") {
|
if (req.query.lucky === "true") {
|
||||||
|
@ -344,6 +342,15 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
return `https://vid.puffyan.us/vi/${video.videoId}/hqdefault.jpg`;
|
return `https://vid.puffyan.us/vi/${video.videoId}/hqdefault.jpg`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (continuation) {
|
||||||
|
const currentAuthorId = cinv.authorId;
|
||||||
|
const firstVideoAuthorId = tj.videos[0].authorId;
|
||||||
|
|
||||||
|
if (currentAuthorId !== firstVideoAuthorId) {
|
||||||
|
res.status(400).send("continuation does not match the channel :c - how tf did this happen :sob:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cache[ID] = {
|
cache[ID] = {
|
||||||
result: {
|
result: {
|
||||||
|
|
Loading…
Reference in a new issue