- /login: look at customer’s credentials and make certain that the associate can be log in to help you the applying, or not.
- /users/create: perform a new user from the application.
- /users/recommend: get the recommended pages. Inside application, the recommended pages need certainly to pursue some criteria, for each and every representative, that is throughout the listing, must not have any coordinating request on latest affiliate. From that point, this new gender of every associate will be contrary to the present customer’s intercourse.
- /requests/create: do a complement needs between dos pages.
Brand new Log on API
The login API will get brand new user’s credentials and you can validate that guidance. Whether your user’s information is legitimate, the consumer is log on to the application and you can the other way around. To help make the log on API, you will want to create the “auth.js” document for the “routes” folder. The full source code of the log in API can be acquired here.
the method is Article together with demand cargo is to secure the user’s current email address and you may owner’s code. In the event your customer’s info is good, the fresh new customer’s sex and you may user’s CometChat uid is came back right back since an answer object. Following that, a warning content is came back if your owner’s back ground are maybe not appropriate. The normally consider the latest code snippet below to find out more.
The user API
This section commonly describe the brand new APIs to own representative management. First and foremost, we should instead produce the “users.js” document within the “routes” folder. It will includes a couple API endpoints eg doing a special representative membership, highly recommend users according to research by the customer’s sex and also the CometChat uid. An entire fouce password is present right here.
The fresh new Create Representative API
Within area, we will develop an API to produce a special account for the the program. The fresh new API will receive the fresh new less than information. Their method is Article and we will publish the design studies format about client side plus the demand is always to hold the customer’s email, owner’s code, user’s decades, customer’s gender, user’s avatar, owner’s name, and you will owner’s CometChat uid.
This new API is always to browse the version of new avatar image. In this app, i let the user to help you publish a photograph that have jpeg format. On top of that, these information is required. For many who miss one thing on the consult payload, a warning message might possibly be returned straight back on effect. Moreover, this new API usually check the owner’s current email address has been used during the the program, or perhaps not. Whether or not it resided in the system, a warning content would be returned to revise an individual in the you to. You could potentially relate to the newest lower than password snippet to find out more.
The latest Strongly recommend Pages API
Depending on the criteria, we need to have the ability having pages reddit eHarmony vs Match to consider most other associate-pages and you may sometimes undertake otherwise refuse (swipe). And this, we’re going to create an API to highly recommend users and feature the newest list of recommended users toward UI. Within app, an user would-be recommended if it affiliate ought not to provides one matching request into most recent member. Following that, the latest gender of each member is reverse to the present user’s intercourse. The full resource password is available right here.
The fresh new Meets Request API
So it part tend to describe the APIs getting controlling the matching requests. From the software, in case the newest representative wants somebody’s character, the current affiliate can be swipe correct otherwise click on the center symbol. First of all, we need to create the “requests.js” file during the “routes” folder. It will have an API endpoint and is on doing a special complimentary demand. A full source code can be found right here.