-
Notifications
You must be signed in to change notification settings - Fork 97
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
chore: Refactor lastUpdated #2314
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 <chris-hartmann@gmx.de>
3cfddb1
to
9ad8d3d
Compare
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.