* static files changes * remake modifiers * test case * some docs changes * deps and rule changes * edit proper interfaces * remake getServer * @elysiajs/swagger * remake tsconfig * ci changes use bun * docs changes * feat(core): hard remake with bun and elysia * chore(release): 8.2.0-alpha * auto release * ci * update global * chore(release): 8.2.1-alpha * ci
16 lines
415 B
TypeScript
16 lines
415 B
TypeScript
import { scrapeContent } from "../../scraper/xhamster/xhamsterSearchController";
|
|
import c from "../../utils/options";
|
|
|
|
export async function relatedXhamster({ query }: { query: { id: string } }) {
|
|
try {
|
|
const { id } = query;
|
|
const url = `${c.XHAMSTER}/${id}`;
|
|
const data = await scrapeContent(url);
|
|
return data;
|
|
} catch (err) {
|
|
const e = err as Error;
|
|
throw new Error(e.message);
|
|
}
|
|
}
|
|
|