There is a scheme post and user. As I understand need for flexibility to create a schema like and write there user id / post id.
But I don't understand how can I provide a handler. the nonsense goes ...
Ie collections likes need to find the record with the post id && id user,
if the record already exists, then delete it and reduce the count of likes from the post,
if the entry does not exist, create it and increase the count of likes from the post.
But how to catch the promise from the condition ? Please explain
( async/ await do not offer, I want to understand how it should work,
and then make async/ await consciously )