METHOD /auth
This route is used to handle auth related like check username, check email, register, etc. This route also open to public.
route to check if username exist. thiis route will giving error response when username exist
POST /auth/register-username
json body example:
{
"user_name": "movidb"
}
route to check if email exist. this route will giving error response when email exist
POST /auth/register-email
json body example:
{
"email": "[email protected]"
}
route that added user into db.
POST /auth/register
json body example:
{
"user_name": "movidb",
"email": "[email protected]",
"country_id": "id",
"password": "movidb",
"email": "[email protected]"
}
to check if username or email exist.
POST /auth/login-username
json body example:
{
"user_name": "movidb"
}
or
{
"email": "[email protected]"
}
to check if password match.
POST /auth/login-password
json body example:
{
"user_name": "movidb",
"password": "movidb"
}
or
{
"email": "movidb",
"password": "movidb"
}
Clean user cookies.
GET /auth/logout
This route only available for admin.
Admin add new admin with registering new account.
POST /admin/register-new-admin
json body example:
{
"user_name": "newadmin",
"email": "[email protected]",
"country_id": "id",
"password": "movidb",
"email": "[email protected]",
"role": "6"
}
This route used for changing authority level (role). note: admin cannot modify userID that have role higher than him, or change some role higher than his role.
PUT /admin/admin-level
json body example:
{
"user_id": 6,
"role": 10
}
Identifier used to identify whether review, comment, etc. is blocked, in review, online, etc.
POST /admin/new-identifier
json body example:
{
"info": "blocked"
}
Get List of admin
GET /admin/admin-list
Search user
GET /admin/user/search?uid=admin&limit=2&offset=0
Type is to identify is it movie, kdrama, or anime
POST /admin/movie/add-new-movie-type
json body example:
{
"type_name": "tv-series"
}
Inserting new movie into db.
POST /admin/movie/new-movie
json body example:
{
"movie_title": "iron man",
"movie_synopsis": "synopis",
"release_date": "10 jan 2010",
"imdb_rating": 10,
"imdb_num_vote": 1000,
"metacritics": 4,
"poster_link": "",
"trailer_link": "youtube.com",
"duration": "10 minutes",
"awards": "",
"type_id": 1,
"country_id": "id",
"language": "id",
"unique_link": "iron-man",
"identifier_id": 1
}
Edit Movie.
PUT /admin/movie/edit-movie
json body example:
{
"movie_title": "iron man",
"movie_synopsis": "synopis",
"release_date": "10 jan 2010",
"imdb_rating": 10,
"imdb_num_vote": 1000,
"metacritics": 4,
"poster_link": "",
"trailer_link": "youtube.com",
"duration": "10 minutes",
"awards": "",
"type_id": 1,
"country_id": "id",
"language": "id",
"unique_link": "iron-man",
"identifier_id": 1
}
The table contains all role in movie industry like actress, actor, director, etc.
POST /admin/movie/new-people-role
json body example:
{
"role_name": "writer"
}
The table contains all role in movie industry like actress, actor, director, etc.
POST /admin/movie/update-people-role
json body example:
{
"role_id": 1,
"role_name": "actress"
}
Route that accessible by user or registered member.
Route to update user information like, birthdate, social media link, etc.
PUT /user/{user-id}
{
"user_full_name": "john Doe",
"birthdate": "1 January 2020",
"bio": "movie lovers",
"fb_link": "facebook.com",
"twitter_link": "twitter.com",
"ig_link": "ig.com",
"sex": true
}
for sex variable: true equal to male, false equal to female
GET /public/my-role
This will return your role in number 1 - 99