Skip to content

Commit eb2c3f8

Browse files
committed
fix: include image ids in archive updates
1 parent b81d4b2 commit eb2c3f8

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/app/art/[id]/edit/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ function ArtEditForm({ artwork, artworkId }: { artwork: ArtworkDetail; artworkId
7474
depthCm: toNullableNumber(depth),
7575
createdDate: toDateString(date),
7676
isPublic,
77+
imageIds: artwork.imageIds,
78+
thumbnailIndex: artwork.thumbnailIndex ?? 0,
7779
availableRegions: selectedRegions,
7880
}),
7981
onSuccess: () => {

src/app/space/[id]/edit/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function SpaceEditForm({ space, spaceId }: { space: SpaceDetail; spaceId: string
5959
heightCm: toNullableNumber(height),
6060
depthCm: toNullableNumber(depth),
6161
isPublic,
62+
imageIds: space.imageIds,
6263
}),
6364
onSuccess: () => {
6465
void queryClient.invalidateQueries({ queryKey: ["mypage", "feed"] });

src/services/artworks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ export interface CreateArtworkRequest {
2727
}
2828

2929
export interface UpdateArtworkRequest {
30-
title?: string;
31-
artworkType?: string;
32-
description?: string;
30+
title: string;
31+
artworkType: string;
32+
description: string;
3333
caution?: string;
3434
sizeType?: "STANDARD" | "CUSTOM";
3535
widthCm?: number | null;
3636
heightCm?: number | null;
3737
depthCm?: number | null;
3838
createdDate?: string;
3939
isPublic?: boolean;
40-
imageIds?: number[];
40+
imageIds: number[];
4141
thumbnailIndex?: number;
4242
availableRegions?: string[];
4343
}

src/services/spaces.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ export interface CreateSpaceRequest {
1717
}
1818

1919
export interface UpdateSpaceRequest {
20-
title?: string;
21-
spaceType?: string;
22-
address?: string;
20+
title: string;
21+
spaceType: string;
22+
address: string;
2323
description?: string;
2424
caution?: string;
2525
widthCm?: number | null;
2626
heightCm?: number | null;
2727
depthCm?: number | null;
2828
isPublic?: boolean;
29-
imageIds?: number[];
29+
imageIds: number[];
3030
}
3131

3232
interface GetSpaceFeedParams {

0 commit comments

Comments
 (0)