Files
kulakpos_web/walkthroughs/2026-04-15_a959f93c_Walkthrough__Expose_Bawahan_Advance_API.md
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

1.0 KiB

Walkthrough - Expose Bawahan Advance API

I have successfully exposed the getdatadetailsbawahan function as an API endpoint.

Changes Made

[Bawahan Advance Component]

[NEW] [bawahan-advance-routes.js](file:///home/itc43/Documents/HOKBEN_PROJECT/ESS PROJECT/ess_api/ess_api/app/routes/bawahan-advance-routes.js)

Created a new route file that defines the POST /api/bawahan/getdatadetailsbawahan endpoint. This endpoint is protected by the jwtAuth.verifyToken middleware.

[MODIFY] [server.js](file:///home/itc43/Documents/HOKBEN_PROJECT/ESS PROJECT/ess_api/ess_api/server.js)

Registered the new route file in the main server.js file so it's loaded when the server starts.

Verification Results

Code Integrity

  • The new route file correctly imports jwtAuth and the service trx-bawahan-advance.
  • server.js was updated to include the new routes.

Endpoint Details

  • Method: POST
  • URL: /api/bawahan/getdatadetailsbawahan
  • Headers: Authorization: Bearer <token>
  • Body: { "nik": "..." }