2022-10-16 19:17:55 +03:00
|
|
|
import { getBlogPost } from '~~/lib/blog/read-posts';
|
2022-10-16 12:37:13 +03:00
|
|
|
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
|
|
const slug = getRouterParam(event, 'slug');
|
|
|
|
try {
|
2023-09-22 18:01:40 +03:00
|
|
|
const post = await getBlogPost(slug as string);
|
2022-10-16 12:37:13 +03:00
|
|
|
return post;
|
|
|
|
} catch (e) {}
|
|
|
|
});
|