fix: image stacks on image page

This commit is contained in:
2025-10-05 15:55:50 +01:00
parent 6880811236
commit eaff553dc9
3 changed files with 3 additions and 3 deletions

View File

@ -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)))

View File

@ -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 ?? [])),
});

View File

@ -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>