10 lines
242 B
TypeScript
10 lines
242 B
TypeScript
import { getBlogPost } from '~~/lib/blog/read-posts';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const slug = getRouterParam(event, 'slug');
|
|
try {
|
|
const post = await getBlogPost(slug);
|
|
return post;
|
|
} catch (e) {}
|
|
});
|