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