-
Notifications
You must be signed in to change notification settings - Fork 3
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
[PB-557] fix/file size as number #334
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jzunigax2 There are better ways to achieve this without mutating functions, which could have unforeseen effects in future NestJS versions. Let's implement this in a more standard NestJS way.
How about using NestJS Interceptors? They allow you to execute code before and after the handler (where you can implement your current solution). Additionally, interceptors can be bound to controllers.
With the execution context you should have access to the headers too
Quality Gate failedFailed conditions |
Similar to #321, file size's type is changed from BigInt to Number. This would be a breaking change for the mac desktop client, but
convertSizeMiddleware
is applied to problematic routes as reported by @PixoDev in order to convert the numeric size into string. These routes are:/files/:fileUUID
/files/:fileUUID/meta
/folders/:folderId/files
/files?updatedAt=ISODate