-
Notifications
You must be signed in to change notification settings - Fork 105
chore: Refactor lastUpdated #2314
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
Conversation
77999d8
to
1526824
Compare
f42bf8a
to
bedcc05
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2314 +/- ##
=======================================
Coverage ? 36.25%
Complexity ? 1011
=======================================
Files ? 70
Lines ? 3801
Branches ? 0
=======================================
Hits ? 1378
Misses ? 2423
Partials ? 0 |
bedcc05
to
fbfb022
Compare
@susnux do you have any idea why I get an Error 500 as soon as I open the Forms app?
|
9aef8d5
to
2345d77
Compare
8fcfb8a
to
465c921
Compare
465c921
to
3cfddb1
Compare
@Koc thanks for the approval. Do you perhaps have an idea how to fix the test in a better way? I'm no expert in tests 🙈😂 |
Usually it is recommended to rely on Another variant - you can mock native But I think we can live with current approach. |
Yes we can leave it for now and add a to-do comment. What bothers me the most is that the time() mocking worked before but doesn't anymore. Probably because the timestamp generation is now moved from the ApiController to the FormMapper |
This commit refactors the form creation and update logic in the `ApiController` class. It removes the unnecessary setting of the `created` and `lastUpdated` timestamps in the `Form` entity, as these values are now automatically set in the `FormMapper` class. This improves code readability and reduces redundancy. The changes also include updates to the `FormMapper` class, where the `insert` and `update` methods now automatically set the `created` and `lastUpdated` timestamps respectively. Signed-off-by: Christian Hartmann <[email protected]>
3cfddb1
to
9ad8d3d
Compare
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
This commit refactors the form creation and update logic in the
ApiController
class. It removes the unnecessary setting of thecreated
andlastUpdated
timestamps in theForm
entity, as these values are now automatically set in theFormMapper
class. This improves code readability and reduces redundancy.The changes also include updates to the
FormMapper
class, where theinsert
andupdate
methods now automatically set thecreated
andlastUpdated
timestamps respectively.