Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): stacked assets for full sync, userIds as array for delta sync #9100

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

fyfrey
Copy link
Contributor

@fyfrey fyfrey commented Apr 26, 2024

server changes required for #8842

Copy link

cloudflare-pages bot commented Apr 26, 2024

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: 366d823
Status:⚡️  Build in progress...

View logs

@ValidateUUID({ each: true })
@ApiProperty({ name: 'userIds[]' })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd want @IsArray() instead. That also gives you proper validation

Copy link
Contributor Author

@fyfrey fyfrey Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? I think, I tried that first. IsArray is already set in the open API json description.

This change makes the client send a single value so that express sees it as an array in any case.

I'll try it again tomorrow just to be sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently you are right, sorry. I think you want both annotations then though, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to delete the API property without impacting the spec file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After you delete this line, feel free to merge it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was specifically for a query param, which indeed was needed. I just changed it to post to avoid these types of serialization issues entirely.

@jrasm91 jrasm91 merged commit 32e7cfe into main Apr 29, 2024
22 of 23 checks passed
@jrasm91 jrasm91 deleted the fix/new-sync-stacked-userids branch April 29, 2024 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants