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

refactor(server): move asset detail endpoint to new controller #6636

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Jan 25, 2024

Note

/asset/assetById/:id is deprecated and will be removed in a future release

  • Rename api-v1/asset/asset-repository to *V1 everywhere
  • Add a new /asset/:id endpoint (in the new controller)
  • Move the existing service method to the new service
  • Point the old method at the new service
  • Delete the old repository implementation and use the new one instead
  • Added e2e tests for the asset detail endpoint

Note: A lot of relations where loaded for serveFile, but now it should just load the asset, so that endpoint should be faster.

Copy link

cloudflare-pages bot commented Jan 25, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4735b9a
Status: ✅  Deploy successful!
Preview URL: https://ad497ddf.immich.pages.dev
Branch Preview URL: https://refactor-asset-by-id.immich.pages.dev

View logs

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

Nice! Making progress in getting rid of api-v1 is always great :)

server/src/domain/asset/asset.service.ts Outdated Show resolved Hide resolved
@jrasm91 jrasm91 merged commit b306cf5 into main Jan 25, 2024
24 checks passed
@jrasm91 jrasm91 deleted the refactor/asset-by-id branch January 25, 2024 17:52
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