mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 18:29:03 +01:00
continuations!!!
This commit is contained in:
parent
5712a5be07
commit
018472e4b4
1 changed files with 11 additions and 11 deletions
22
server.js
22
server.js
|
@ -460,17 +460,10 @@ app.get("/search", async (req, res) => {
|
||||||
const { toJson } = require("xml2json");
|
const { toJson } = require("xml2json");
|
||||||
const query = req.query.query;
|
const query = req.query.query;
|
||||||
|
|
||||||
if(req.query.continuation){
|
if(req.query.continuation){ var continuation = 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}&continuation=${continuation}`);
|
||||||
if(!req.query.continuation){
|
|
||||||
var continuation = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
const search = await fetch(
|
|
||||||
`https://tube.kuylar.dev/api/search?query=${query}&continuation=${continuation}`
|
|
||||||
);
|
|
||||||
|
|
||||||
const text = await search.text();
|
const text = await search.text();
|
||||||
const j = JSON.parse(toJson(text));
|
const j = JSON.parse(toJson(text));
|
||||||
|
@ -499,6 +492,12 @@ app.get("/channel/", async (req, res) => {
|
||||||
const c = await channel.text();
|
const c = await channel.text();
|
||||||
const tj = JSON.parse(toJson(c));
|
const tj = JSON.parse(toJson(c));
|
||||||
|
|
||||||
|
|
||||||
|
if(req.query.continuation){ var continuation = req.query.continuation }
|
||||||
|
if(!req.query.continuation){ var continuation = "" }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const summary = await wiki.summary(k.Channel.Metadata.Name);
|
const summary = await wiki.summary(k.Channel.Metadata.Name);
|
||||||
|
|
||||||
var w = "";
|
var w = "";
|
||||||
|
@ -522,6 +521,7 @@ app.get("/channel/", async (req, res) => {
|
||||||
tab: tab,
|
tab: tab,
|
||||||
j: k,
|
j: k,
|
||||||
tj: tj,
|
tj: tj,
|
||||||
|
continuation:continuation,
|
||||||
wiki: w,
|
wiki: w,
|
||||||
getFirstLine:getFirstLine,
|
getFirstLine:getFirstLine,
|
||||||
isMobile: req.useragent.isMobile,
|
isMobile: req.useragent.isMobile,
|
||||||
|
|
Loading…
Reference in a new issue