diff --git a/app/api/v1/get-tags/route.ts b/app/api/v1/get-tags/route.ts index 218471a..c0cab6d 100644 --- a/app/api/v1/get-tags/route.ts +++ b/app/api/v1/get-tags/route.ts @@ -2,7 +2,14 @@ import 'server-only' import { fetchTagsList } from '~/server/lib/query' export async function GET() { - const data = await fetchTagsList(); + const res = await fetchTagsList(); + const data = [{ + name: '首页', + tag_value: '/' + }] + if (Array.isArray(res) && res.length > 0) { + data.push(...res) + } return Response.json(data) } diff --git a/components/admin/list/ListProps.tsx b/components/admin/list/ListProps.tsx index 6646be9..12c9301 100644 --- a/components/admin/list/ListProps.tsx +++ b/components/admin/list/ListProps.tsx @@ -171,9 +171,6 @@ export default function ListProps(props : Readonly) { 全部 - - 首页 - {tags?.map((tag: TagType) => ( {tag.name} diff --git a/components/admin/upload/FileUpload.tsx b/components/admin/upload/FileUpload.tsx index d8b95d5..3aa54b5 100644 --- a/components/admin/upload/FileUpload.tsx +++ b/components/admin/upload/FileUpload.tsx @@ -516,9 +516,6 @@ export default function FileUpload() { setTag(updatedSet) }} > - - 首页 - {data?.map((tag: TagType) => ( {tag.name}