Moved to ky for requests, significant improvements to YT client implementation with ky instances

This commit is contained in:
Eclypsed
2024-07-04 02:54:24 -04:00
parent f17773838a
commit 8453e51d3f
33 changed files with 2245 additions and 1370 deletions

View File

@@ -1,9 +1,9 @@
import type { RequestHandler } from '@sveltejs/kit'
import { buildConnection } from '$lib/server/api-helper'
import { ConnectionFactory } from '$lib/server/api-helper'
export const GET: RequestHandler = async ({ params, url }) => {
const connectionId = params.connectionId!
const connection = await buildConnection(connectionId).catch(() => null)
const connection = await ConnectionFactory.getConnection(connectionId).catch(() => null)
if (!connection) return new Response('Invalid connection id', { status: 400 })
const albumId = url.searchParams.get('id')