Skip to content

Commit 8d3879c

Browse files
c121914yuFinleyGe
authored andcommitted
fix: tag union field
1 parent 5519248 commit 8d3879c

File tree

11 files changed

+4
-176
lines changed

11 files changed

+4
-176
lines changed

modules/tool/controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export async function getTool(toolId: string): Promise<ToolType | undefined> {
1919
}
2020

2121
export function getToolTags(): z.infer<typeof ToolTagListSchema> {
22-
return Object.entries(ToolTagsNameMap).map(([type, name]) => ({
23-
type: type as z.infer<typeof ToolTagEnum>,
22+
return Object.entries(ToolTagsNameMap).map(([id, name]) => ({
23+
id: id as z.infer<typeof ToolTagEnum>,
2424
name
2525
}));
2626
}

modules/tool/packages/test1/DESIGN.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

modules/tool/packages/test1/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

modules/tool/packages/test1/config.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

modules/tool/packages/test1/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

modules/tool/packages/test1/logo.svg

Lines changed: 0 additions & 20 deletions
This file was deleted.

modules/tool/packages/test1/package.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

modules/tool/packages/test1/src/index.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

modules/tool/packages/test1/test/index.test.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

modules/tool/type/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ToolSchema, VersionListItemSchema } from './tool';
44

55
export const ToolTagListSchema = z.array(
66
z.object({
7-
type: z.string(),
7+
id: z.string(),
88
name: I18nStringStrictSchema
99
})
1010
);

0 commit comments

Comments
 (0)