Repository files navigation User Roles and Permissions
Can Like Movies : Regular users can express their appreciation for movies by liking them.
Search Movies : Access to search and explore the movie database.
All Regular User Permissions : Critics have all the permissions of regular users.
Can Review Movies : They can write detailed reviews for movies, providing insights and ratings.
All Critic Permissions : Admins have all the permissions of critics.
Manage Reviews : Admins can delete reviews that do not adhere to community guidelines or standards.
Anonymous Users (No Login)
Search Movies : They can search and view movies but cannot like or review them.
Access other profile
POST /auth/login
Authenticates a user
Body : { email: String, password: String }
GET /profile/:id
Retrieves a user's profile
Parameters : id - User's ID
Authorization : Bearer Token required
GET /profile/:id/friends
Retrieves a user's friends list
Parameters : id - User's ID
Authorization : Bearer Token required
PATCH /profile/:id/:friendId
Adds or removes a friend
Parameters :
id - User's ID
friendId - Friend's ID
Authorization : Bearer Token required
PATCH /profile/:id
Updates a user's profile
Parameters : id - User's ID
Body : JSON object with fields to update
Authorization : Bearer Token required
GET /posts/
Retrieves feed posts
Authorization : Bearer Token required
GET /posts/:userId/posts
Retrieves posts by a specific user
Parameters : userId - User's ID
Authorization : Bearer Token required
PATCH /posts/:id/like
Likes a post
Parameters : id - Post's ID
Authorization : Bearer Token required
GET /movie/details/:imdbId
Retrieves details of a movie
Parameters : imdbId - IMDb ID of the movie
Access : Public
POST /movie/like/:imdbId
Likes a movie
Parameters : imdbId - IMDb ID of the movie
Authorization : Bearer Token required
Access : Regular Users, Critics
DELETE /movie/like/:imdbId
Unlikes a movie
Parameters : imdbId - IMDb ID of the movie
Authorization : Bearer Token required
Access : Regular Users, Critics
POST /movie/review/:imdbId
Adds a review to a movie
Parameters : imdbId - IMDb ID of the movie
Body : { reviewText: String }
Authorization : Bearer Token required
Access : Critics
DELETE /movie/review/:imdbId/:reviewId
Removes a review from a movie
Parameters :
imdbId - IMDb ID of the movie
reviewId - ID of the review
Authorization : Bearer Token required
Access : Admin
One-to-Many Relationships
Movie to Review : One movie has many reviews.
User to Post : A user can have many posts.
Many-to-Many Relationships
Movie to User (Likes) : A movie can be liked by many users, and a user can like many movies.
User Follows User Users can follow multiple other users, and can be followed by multiple users.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.