Real-Dev-Squad / website-backend

The backend code for all our website-related apps
https://api.realdevsquad.com/
MIT License
52 stars 253 forks source link

update updated_at in user documents whenever user data is updated #1980

Closed MehulKChaudhari closed 6 months ago

MehulKChaudhari commented 6 months ago

Date: 23/03/2024

Developer Name: Mehul Chaudhari


Issue Ticket Number

1929

Description

Some APIs which update the user documents now don't update the updated_at field in the user document which says when the document was updated latest.

Not adding or updating tests, because we are just updating the updated_at field while updating the user document, and most of the API's do not return the updated_at field in the response.

Documentation Updated?

Under Feature Flag

Database Changes

Breaking Changes

Development Tested?

Test Coverage

Screenshot 1 image

prakashchoudhary07 commented 6 months ago

Ideally, we should have a single service that only updates the user data, and in that service updated_at is added

prakashchoudhary07 commented 6 months ago

Please create a following issues to refactor that

MehulKChaudhari commented 6 months ago

Ideally, we should have a single service that only updates the user data, and in that service updated_at is added

Yes Right, But the old code was such that, I had to do it this way. we have a model function called addOrUpdate but developers have not used it properly.