re-add error checker
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m18s

This commit is contained in:
Fijxu 2025-03-17 00:23:57 -03:00
parent 3ddbd0c19e
commit 2c5ea21300
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -46,15 +46,20 @@ player.post("/player", async (c) => {
const jsonReq = await c.req.json();
const innertubeClient = c.get("innertubeClient");
const konfigStore = c.get("konfigStore");
console.log(jsonReq);
if (jsonReq.videoId) {
return c.json(
await youtubePlayerParsing({
innertubeClient,
videoId: jsonReq.videoId,
konfigStore,
tokenMinter: c.get("tokenMinter"),
}),
);
const yt = await youtubePlayerParsing({
innertubeClient,
videoId: jsonReq.videoId,
konfigStore,
tokenMinter: c.get("tokenMinter"),
});
errors.forEach((error) => {
if (error.check(yt)) {
error.action();
}
});
return c.json(yt);
}
});