Skip to content

Commit 01d8142

Browse files
committed
remove filename from attach asset api
1 parent fa92102 commit 01d8142

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

packages/open-api/karakeep-openapi-spec.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,10 +1711,6 @@
17111711
"userUploaded",
17121712
"unknown"
17131713
]
1714-
},
1715-
"fileName": {
1716-
"type": "string",
1717-
"nullable": true
17181714
}
17191715
},
17201716
"required": [

packages/open-api/lib/bookmarks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { z } from "zod";
66

77
import {
88
zAssetSchema,
9+
zAssetTypesSchema,
910
zBareBookmarkSchema,
1011
zManipulatedTagSchema,
1112
zNewBookmarkRequestSchema,
@@ -418,7 +419,10 @@ registry.registerPath({
418419
description: "The asset to attach",
419420
content: {
420421
"application/json": {
421-
schema: zAssetSchema,
422+
schema: z.object({
423+
id: z.string(),
424+
assetType: zAssetTypesSchema,
425+
}),
422426
},
423427
},
424428
},

packages/trpc/routers/assets.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ export const assetsAppRouter = router({
9999
.input(
100100
z.object({
101101
bookmarkId: z.string(),
102-
asset: zAssetSchema,
102+
asset: z.object({
103+
id: z.string(),
104+
assetType: zAssetTypesSchema,
105+
}),
103106
}),
104107
)
105108
.output(zAssetSchema)

0 commit comments

Comments
 (0)