Skip to content

Commit

Permalink
Merge pull request #86 from besscroft/dev
Browse files Browse the repository at this point in the history
v0.9.2
  • Loading branch information
besscroft authored Jun 29, 2024
2 parents aead305 + 4c34266 commit f066475
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 8 additions & 1 deletion app/api/v1/get-tags/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
3 changes: 0 additions & 3 deletions components/admin/list/ListProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ export default function ListProps(props : Readonly<ImageServerHandleProps>) {
<SelectItem key="all" value="all">
全部
</SelectItem>
<SelectItem key="/" value="/">
首页
</SelectItem>
{tags?.map((tag: TagType) => (
<SelectItem key={tag.tag_value} value={tag.tag_value}>
{tag.name}
Expand Down
3 changes: 0 additions & 3 deletions components/admin/upload/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,6 @@ export default function FileUpload() {
setTag(updatedSet)
}}
>
<SelectItem key="/" value="/">
首页
</SelectItem>
{data?.map((tag: TagType) => (
<SelectItem key={tag.tag_value} value={tag.tag_value}>
{tag.name}
Expand Down

0 comments on commit f066475

Please sign in to comment.