Registers the new User and Signs the JWT
Logs the new User and returns the JWT
After loggin in the user can add the photo
Takes the blocker ID from JWT and the person to be blocked ID from parameters and adds the entry into a table blockedUsers
Takes the liker ID from JWT and the person to be liked ID from parameters and adds the notification count of the parameter ID
It is assumed that each profile card will be visible on a page and when a user clicks next the get profile API will be fired again , it returns a random user and information after checking and not considering the users blocked by this user from the blockedUsers table
Their code is self explanatory
Socket keeps listening at the port and whenevcr a connection is established it authenticates with JWT and also extracts the userID and from the table likedNotif it sends it the total number of notifications equal to the number of people liked , then the entry is deleted from the table. This ensures that the user recieves notification whenever it comes online and no notification is lost.