Inside section, we’re going to establish the fresh APIs which is necessary to build the Tinder duplicate

Inside section, we’re going to establish the fresh APIs which is necessary to build the Tinder duplicate

  • /login: have a look at customer’s credentials and ensure the affiliate normally log in to the application, or not.
  • /users/create: do an alternative user in the app.
  • /users/recommend: have the recommended profiles. Within this software, the recommended profiles need certainly to follow some standards, each representative, which is regarding the listing, cannot have coordinating consult into the most recent user. Following that, the latest gender each and every member would be reverse to the present customer’s gender.
  • /requests/create: carry out a complement requests between dos users.

eight. Brand new Log on API

The latest log on API will have the fresh customer’s background and confirm one pointers. Should your owner’s info is legitimate, the consumer is also log on to the program and you may the other way around. To create the fresh log in API, you ought to create the “auth.js” document in the “routes” folder. The full origin code of login API is present here.

its system is Article while the demand payload is to keep the user’s current email address and you will owner’s password. When your user’s info is appropriate, this new user’s gender and you can customer’s CometChat uid will be came back straight back since the a response object. After that, a caution content would be came back should your user’s background are perhaps not legitimate.

(đọc thêm)
Trang chủCác danh mụcTài khoản
Tìm kiếm