Skip to content

Commit d14c8ac

Browse files
committed
fix(renterd): files copy metadata
1 parent 83c2804 commit d14c8ac

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.changeset/silver-pants-deliver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'renterd': patch
3+
---
4+
5+
Fixed an issue with the copy file metadata action in the file context menu.

.changeset/thick-geckos-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@siafoundation/renterd-types': minor
3+
---
4+
5+
The object response has been updated in v2.

apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ export function CopyMetadataMenuItem({ path }: Props) {
2828
disabled={!obj.data}
2929
onSelect={() => {
3030
if (obj.data) {
31-
copyToClipboard(
32-
JSON.stringify(obj.data.object, null, 2),
33-
'object metadata'
34-
)
31+
copyToClipboard(JSON.stringify(obj.data, null, 2), 'object metadata')
3532
}
3633
}}
3734
>

libs/renterd-types/src/bus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export type ObjectsResponse = {
417417

418418
export type ObjectParams = { key: string; bucket: string }
419419
export type ObjectPayload = void
420-
export type ObjectResponse = { object: Obj }
420+
export type ObjectResponse = Obj
421421

422422
export type ObjectAddParams = { key: string; bucket: string }
423423
export type ObjectAddPayload = {

0 commit comments

Comments
 (0)