Skip to content

intellihr/intelliHR-node-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intelliHR-node-test

The /api/search?superhero={name} API endpoint allows you to request the full data from a superhero and display the results in its response.

Use a tool of your preferenance (postman, insomnia, etc) to execute the API requests.

  • Note: Each successfull or failed response should be returned with its corresponding status code(eg: 2xx, 4xx, 5xx)

Tasks:

  • Store the superhero search name together with the fullname of the superhero returned from the superhero API endpoint and a randomly generated id in the search.json file. It's up to you to decide the format for storing the data in the search.json file.
  • Create an API endpoint under api/{path}/list where it returns all the data stored in search.json file (our search list).
  • Create an API endpoint under api/{path}/:id where you can delete a superhero search record from the search.json file based on its id.

Extra Tasks (Optional):

  • Validate the id passed on the endpoint's path before removing the record (eg: abc as id should not be accepted).
  • Add unit tests on your created endpoints for testing their functionality.

Helpful links:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published