Previously, our efforts to pare down the database output of fetching tasks resulted in the id field (which copies the internal _id) being excluded when the request included the type=completedTodos query parameter.
Now, logic to add the id and strip the internal __v are moved earlier in the code, executed regardless of whether the user is requesting active tasks or completed To Do's.
Previously, our efforts to pare down the database output of fetching tasks resulted in the
id
field (which copies the internal_id
) being excluded when the request included thetype=completedTodos
query parameter.Now, logic to add the
id
and strip the internal__v
are moved earlier in the code, executed regardless of whether the user is requesting active tasks or completed To Do's.