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(
|
||||
Image.
|
||||
LEFT_JOIN(ImageStacks, ImageStacks.ImageID.EQ(ImageStacks.ID)),
|
||||
LEFT_JOIN(ImageStacks, ImageStacks.ImageID.EQ(Image.ID)),
|
||||
).
|
||||
WHERE(Image.UserID.EQ(UUID(userId)))
|
||||
|
||||
|
@ -194,7 +194,7 @@ const userImageValidator = strictObject({
|
||||
strictObject({
|
||||
ID: pipe(string(), uuid()),
|
||||
ImageID: pipe(string(), uuid()),
|
||||
ListID: pipe(string(), uuid()),
|
||||
StackID: pipe(string(), uuid()),
|
||||
}),
|
||||
)), transform(l => l ?? [])),
|
||||
});
|
||||
|
@ -27,7 +27,7 @@ export const ImagePage: Component = () => {
|
||||
<For each={image()?.ImageStacks}>
|
||||
{(imageList) => (
|
||||
<StackCard
|
||||
stack={stacks().find((l) => l.ID === imageList.ListID)!}
|
||||
stack={stacks().find((l) => l.ID === imageList.StackID)!}
|
||||
/>
|
||||
)}
|
||||
</For>
|
||||
|
Reference in New Issue
Block a user