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