This is a RESTful API built with Express and TypeScript, featuring authentication, product, category, payment and image routes.
User authentication is done through using JSON Web Tokens (JWTs).
https://restful-api-lcl.up.railway.app/api/user/register
Send account activation email to use.
https://restful-api-lcl.up.railway.app/api/user/activation
Notification of activation content.
https://restful-api-lcl.up.railway.app/api/user/login
Set refresh token and access token for Cookies client
https://restful-api-lcl.up.railway.app/api/user/refresh
Set again access token for Cookies client
https://restful-api-lcl.up.railway.app/api/user/logout
Remove access token and refresh token from Cookies client
https://restful-api-lcl.up.railway.app/api/user/logout-all
Logout a user all devices.
https://restful-api-lcl.up.railway.app/api/user/forgot
Send email reset password to email.
User api
https://restful-api-lcl.up.railway.app/api/user/me
Json user information is retrieved from token.
https://restful-api-lcl.up.railway.app/api/user/update
Update the information of a specific user..
https://restful-api-lcl.up.railway.app/api/user/add_cart
Notification of activation content.
https://restful-api-lcl.up.railway.app/api/user/wish_list
Notification of activation content.
Categories API.
https://restful-api-lcl.up.railway.app/api/categories
Returns a list of all categories.
https://restful-api-lcl.up.railway.app/api/categories
Returns a message with the ID of the created category.
https://restful-api-lcl.up.railway.app/api/categories/:id
Returns an array with the specified category.
https://restful-api-lcl.up.railway.app/api/categories/:id
Delete, or update the information of the specific category.
Products API.
https://restful-api-lcl.up.railway.app/api/products
Returns an array with all the categories stored in the database.
https://restful-api-lcl.up.railway.app/api/product
Returns a message with the ID of the product created.
https://restful-api-lcl.up.railway.app/api/product/:id
https://restful-api-lcl.up.railway.app/api/product/:id
Payments API.
https://restful-api-lcl.up.railway.app/api/payments
Returns the public_id and public_url of the image hosted on Cloudinary.
https://restful-api-lcl.up.railway.app/api/payments
Delete the cloudinary image.
Images API.
https://restful-api-lcl.up.railway.app/api/image/upload
Returns the public_id and public_url of the image hosted on Cloudinary.
https://restful-api-lcl.up.railway.app/api/image/destroy
Delete the cloudinary image.