youtuber-blog-frontend/build/server/chunks/_server-CUyeZ2oY.js
2024-05-29 20:43:41 +02:00

15 lines
454 B
JavaScript

import { c as config } from './config-DeQcbWtq.js';
import { e as error, j as json } from './index-Ddp2AB5f.js';
import 'dotenv';
async function GET(event) {
if (!event.url.searchParams.has("id"))
return error(400);
const id = event.url.searchParams.get("id");
const article = await fetch(config.api_url + "/blog/article?id=" + id).then((x) => x.json());
return json(article);
}
export { GET };
//# sourceMappingURL=_server-CUyeZ2oY.js.map