URL: /register
Method: POST
Description: Register a new user.
Request Body:
{ "email": "string", "username": "string", "fullname": "string", "no_hp": "string", "skin_type": "string", "password": "string" }
URL: /login
Method: POST
Description: Login a user.
Request Body:
{ "email": "string", "password": "string" }
URL: /users Method: GET Description: Get the authenticated user's profile. Headers: Authorization: Bearer
URL: /users Method: PUT Description: Update the authenticated user's profile. Headers: Authorization: Bearer Request Body (Form Data): foto: File Other profile fields as needed.
URL: /barang Method: GET Description: Get all barang. Headers: Authorization: Bearer
URL: /barang/users Method: GET Description: Get all barang added by the authenticated user. Headers: Authorization: Bearer
URL: /barang/:id Method: GET Description: Get barang by ID. Headers: Authorization: Bearer
URL: /barang Method: POST Description: Add new barang. Headers: Authorization: Bearer Request Body (Form Data): foto: File[] (up to 2 files) Other barang fields as needed.
URL: /barang/:id Method: PUT Description: Update barang by ID. Headers: Authorization: Bearer Request Body (Form Data): foto: File[] (up to 2 files) Other barang fields as needed.
URL: /barang/:id Method: DELETE Description: Delete barang by ID. Headers: Authorization: Bearer
URL: /wishlist
Method: POST
Description: Add new wishlist item.
Headers:
Authorization: Bearer
Request Body:
{ "barangId": "string" }
URL: /wishlist Method: GET Description: Get all wishlist items for the authenticated user. Headers: Authorization: Bearer
URL: /wishlist/:id Method: DELETE Description: Delete a wishlist item by ID. Headers: Authorization: Bearer
URL: /articles Method: POST Description: Add new article. Request Body (Form Data): foto: File Other article fields as needed.
URL: /articles Method: GET Description: Get all articles. Headers: Authorization: Bearer
URL: /articles/:id Method: GET Description: Get article by ID. Headers: Authorization: Bearer
URL: /articles/:id Method: PUT Description: Update article by ID. Request Body (Form Data): foto: File Other article fields as needed.
URL: /articles/:id Method: DELETE Description: Delete article by ID.