re-add error checker
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m18s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m18s
This commit is contained in:
parent
3ddbd0c19e
commit
2c5ea21300
1 changed files with 13 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue