优化结构
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { getAllPosts } from '@/lib/posts';
|
||||
|
||||
export function GET() {
|
||||
const posts = getAllPosts().map((post) => ({
|
||||
export async function GET() {
|
||||
const posts = (await getAllPosts()).map((post) => ({
|
||||
title: post.title,
|
||||
href: post.href,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user