fix: image stacks on image page
This commit is contained in:
@ -60,7 +60,7 @@ func (m UserModel) GetUserImages(ctx context.Context, userId uuid.UUID) ([]UserI
|
|||||||
).
|
).
|
||||||
FROM(
|
FROM(
|
||||||
Image.
|
Image.
|
||||||
LEFT_JOIN(ImageStacks, ImageStacks.ImageID.EQ(ImageStacks.ID)),
|
LEFT_JOIN(ImageStacks, ImageStacks.ImageID.EQ(Image.ID)),
|
||||||
).
|
).
|
||||||
WHERE(Image.UserID.EQ(UUID(userId)))
|
WHERE(Image.UserID.EQ(UUID(userId)))
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ const userImageValidator = strictObject({
|
|||||||
strictObject({
|
strictObject({
|
||||||
ID: pipe(string(), uuid()),
|
ID: pipe(string(), uuid()),
|
||||||
ImageID: pipe(string(), uuid()),
|
ImageID: pipe(string(), uuid()),
|
||||||
ListID: pipe(string(), uuid()),
|
StackID: pipe(string(), uuid()),
|
||||||
}),
|
}),
|
||||||
)), transform(l => l ?? [])),
|
)), transform(l => l ?? [])),
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,7 @@ export const ImagePage: Component = () => {
|
|||||||
<For each={image()?.ImageStacks}>
|
<For each={image()?.ImageStacks}>
|
||||||
{(imageList) => (
|
{(imageList) => (
|
||||||
<StackCard
|
<StackCard
|
||||||
stack={stacks().find((l) => l.ID === imageList.ListID)!}
|
stack={stacks().find((l) => l.ID === imageList.StackID)!}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
Reference in New Issue
Block a user