Within area, we shall produce this new APIs and that’s necessary to generate our very own Tinder clone
- /login: check owner’s credentials and make certain the affiliate normally login to help you the applying, or otherwise not.
- /users/create: manage yet another member on software.
- /users/recommend: get the necessary users. In this software, the recommended pages need pursue certain conditions, each user, which is regarding the number, ought not to have any complimentary request towards latest representative. After that, the sex each and every affiliate will likely be opposite to the current customer’s gender.
- /requests/create: would a fit desires anywhere between 2 users.
This new Login API
The brand new sign on API can get new customer’s back ground and verify that advice. In the event your user’s info is legitimate, the consumer is also log in to the application and you will vice versa. To create the latest sign on API, you ought to create the “auth.js” file within the “routes” folder. A full origin password of your own login API can be found right here.
their system is Post while the consult cargo would be to secure the user’s email address and owner’s password. In the event your customer’s data is good, this new user’s gender and you will owner’s CometChat uid would be returned right back as an answer target. Following that, an alert message would-be returned in case the customer’s back ground are maybe not legitimate. The normally consider the newest code snippet below to learn more.
The user API
So it area usually explain the new APIs to possess affiliate administration. To begin with, we have to produce the “profiles.js” file within the “routes” folder. It will include one or two API endpoints instance starting an alternative representative account, highly recommend profiles according to the user’s gender therefore the CometChat uid. An entire fouce password is available right here. Read more