- /login: see customer’s history and make certain the affiliate can be login to the program, or otherwise not.
- /users/create: do another representative on the application.
- /users/recommend: have the demanded pages. Inside app, advised pages need certainly to realize specific criteria, for each and every representative, that is on checklist, cannot have matching request on the latest associate. Following that, the new gender of any associate are going to be contrary to the current owner’s sex.
- /requests/create: perform a complement needs between dos pages.
Brand new Sign on API
The fresh new login API will have new user’s background and you may confirm one suggestions. If the user’s data is legitimate, an individual can also be log in to the application form and you may the other way around. To help make the fresh sign on API, you should produce the “auth.js” file within the “routes” folder. An entire provider password of the log on API can be obtained here.
the method is Article additionally the consult payload is to keep the customer’s current email address and you will user’s password. If for example the user’s info is legitimate, the fresh new user’s sex and you will user’s CometChat uid could be came back straight back just like the a reply target. After that, an alert content would-be came back should your customer’s credentials are perhaps not appropriate. Your own can reference the latest code snippet below for eharmony przeglД…d more information.
The consumer API
It area have a tendency to describe the brand new APIs for associate government. To begin with, we should instead produce the “users.js” file for the “routes” folder. It does consists of two API endpoints instance carrying out a different sort of member membership, recommend users according to research by the customer’s intercourse plus the CometChat uid. A full fouce password is available right here.
The Do Representative API
Within this area, we are going to build an enthusiastic API to help make a different sort of account in the the program. The API will receive new less than pointers. Its experience Article and we’ll posting the form research style on the consumer top in addition to consult would be to secure the user’s email, user’s password, customer’s age, customer’s intercourse, customer’s avatar, customer’s complete name, and you can user’s CometChat uid.
New API is to read the type of the new avatar picture. Within this app, we let the associate to help you upload an image with jpeg format. Simultaneously, the aforementioned info is called for. If you miss something regarding the consult payload, a caution content would-be came back back on the impulse. More over, the brand new API will browse the owner’s email has been utilized when you look at the the applying, or otherwise not. Whether or not it stayed regarding program, a warning message could be gone back to revise the consumer regarding the that. You might relate to this new lower than code snippet to find out more.
New Recommend Pages API
Depending on the criteria, we must have the ability to own users to take on other affiliate-pages and often undertake or reject (swipe). Which, we’re going to write an enthusiastic API to highly recommend users and feature the fresh selection of required profiles into UI. Within this app, a consumer might possibly be required if it representative ought not to keeps any coordinating demand into current affiliate. From there, new sex of any representative should be opposite to the present owner’s sex. An entire provider code is available here.
The latest Match Demand API
It area usually establish the fresh new APIs to own managing the complimentary requests. Regarding the app, should your current affiliate likes another person’s reputation, the present day affiliate can be swipe proper otherwise click the center icon. First and foremost, we have to produce the “desires.js” file during the “routes” folder. It can contain an API endpoint and it is regarding doing a unique matching demand. An entire origin code is obtainable right here.