optriment/web3-employment

Create a new API endpoint that will allow users to list all available companies from the database

gruz0 opened this issue · 0 comments

gruz0 commented

The task is to create a new API endpoint that will allow users to list all available companies from the database. The endpoint should be accessible through a GET request to /api/companies.

The endpoint should return a JSON response that includes a list of all available companies, along with their attributes. The attributes that should be included for each company are: id, display_name, comment, created_at, updated_at, and archived_at.

In addition, the API endpoint should be tested thoroughly to ensure that it works as expected. Test cases should cover scenarios such as when there are no companies in the database, and when there are companies in the database. When there are no companies in the database, the endpoint should return an empty array. When there are companies in the database, the endpoint should return an array of companies with all attributes.

By the end of the week, I expect to have successfully implemented the API endpoint and tested it thoroughly to ensure that it meets all requirements.