CenterForDigitalHumanities / TPEN-services

Services required by TPEN interfaces in order to interact with data
1 stars 0 forks source link

WIP on Issue 21 #33

Closed BhanuKandula5030 closed 7 months ago

BhanuKandula5030 commented 7 months ago

This Issue 21 needs to register an endpoint pattern for /line which handles the GET method Required URL parameters : /line and /line/{id}

Changes Introduced:

1.Added a new module line.mjs to handle the /line endpoint with the specified requirements. 2.Modified app.mjs to include the new lineRouter for handling /line requests. 3.Updated existing code for better error handling and asynchronous behavior in the line-related functionality. Testing

Reviewer Steps experience that impact of your changes as part of this software repository:

1.Navigate to the Tpen services folder. 2.npm install (For installing the dependencies ) 3..npm start (Running the application) 4.Terminal Response : Listening on 3001

Testing(Browser/Postman):

1.URL test : GET : http://localhost:3001/line/123 2.Test without the id : GET : http://localhost:3001/line/ 3.Test with id as not number : GET: http://localhost:3001/page/apple 4.Test with not valid id number : GET : http://localhost:3001/page/329

BhanuKandula5030 commented 7 months ago

I have updated the code with the requested comments and added the end to end functionality,exists and functionality unit test cases and everything gets passed.