« first day (4795 days earlier)      last day (368 days later) » 

00:34
01:33
As someone who is obsessed with Aviation, I approve this lol.
 
18 hours later…
19:25
What's your suggestion for adding mongoose document to favourites ?
my idea is to update mongoose schema model with isFavorite true / false , like this
export const updateContact = asyncHandler(
  async (req: Request, res: Response) => {
    const { contactId } = req.params;

    const result = await Contact.findByIdAndUpdate(
      { _id: contactId },
      req.body
    );

    if (!result) {
      const error = new ApiError(404, "Contact not found.");
      throw error;
    }
    res.status(200).json(result);
  }
);
or it's better to use contact id as a reference ?

« first day (4795 days earlier)      last day (368 days later) »