Update the code in api/change-access-code/route.ts to match the format of api/checkin/route.ts. Comment out the password validation logic, keeping only the check that ensures the old password differs from the new one.
Submit a pull request and tag @dangminhduc1101 for review.
Notes
Testing the route isn't necessary at this stage, as it depends on issue #46. However, if you'd like to test the API using a tool other than the frontend, please let me know the results!
The password validation logic should be commented out, not deleted, as it will be handled in the frontend (dependent on issue #46). Once both issues are resolved, we can reintroduce the logic where appropriate.
Problem
There are three issues with
/api/change-access-code
:Expected Format
Refer to: api/checkin/route.ts
Current Format
Refer to: api/change-access-code/route.ts
In the current code, there are checks for:
These checks are better suited for the frontend to improve efficiency.
Instructions
develop
branch.Notes