mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 00:37:49 +01:00
continuations!!!
This commit is contained in:
parent
6cd23bead5
commit
73a844b7bf
1 changed files with 10 additions and 1 deletions
11
server.js
11
server.js
|
@ -459,8 +459,17 @@ app.get("/old/watch", async function (req, res) {
|
|||
app.get("/search", async (req, res) => {
|
||||
const { toJson } = require("xml2json");
|
||||
const query = req.query.query;
|
||||
|
||||
if(req.query.continuation){
|
||||
var continuation = req.query.continuation
|
||||
}
|
||||
|
||||
if(!req.query.continuation){
|
||||
var continuation = ""
|
||||
}
|
||||
|
||||
const search = await fetch(
|
||||
`https://tube.kuylar.dev/api/search?query=${query}`
|
||||
`https://tube.kuylar.dev/api/search?query=${query}&continuation=${continuation}`
|
||||
);
|
||||
|
||||
const text = await search.text();
|
||||
|
|
Loading…
Reference in a new issue