mosh-hamedani / vidly-api-node

309 stars 285 forks source link

The auth backend is missing for me #27

Open ybakhshi opened 4 years ago

ybakhshi commented 4 years ago

There are three collections in my vidly database: Movies, Genres and users but auth is missing.

How to add this collection?

http://localhost:3900/api/auth

AgusDG commented 4 years ago

Auth in this case is not a collection, "/auth" is just an endpoint. The backend server "vidly-api-node", handles the request to that api path.

In fact, auth api and authService.js, handle login and logout, and the only place where user info (email, pass) is, is in users collection. When you want to make an user admin, you add this attribute to the user collection.

Check out the next lesson.

https://codewithmosh.com/courses/357787/lectures/5876740