Skip to content

Implement endpoints to get companies#5

Open
NathaelB wants to merge 4 commits intomainfrom
4-create-endpoint-to-get-a-specific-company
Open

Implement endpoints to get companies#5
NathaelB wants to merge 4 commits intomainfrom
4-create-endpoint-to-get-a-specific-company

Conversation

@NathaelB
Copy link
Copy Markdown
Member

Description

This PR adds two new endpoints for managing companies:

  1. Endpoint to retrieve the list of companies

    • Endpoint: GET /v1/companies
    • Description: This endpoint is used to retrieve the list of all available companies
    • Handler: get_companies::<C>
  2. Endpoint to retrieve a company by its ID

    • Endpoint: GET /companies/:company_id
    • Description: This endpoint is used to retrieve the details of a specific company using its unique identifier.
    • Handler: get_company::<C>

@NathaelB NathaelB linked an issue Nov 11, 2024 that may be closed by this pull request
@NathaelB NathaelB requested a review from LeadcodeDev November 11, 2024 15:30
@NathaelB NathaelB force-pushed the 4-create-endpoint-to-get-a-specific-company branch 2 times, most recently from 8da6c59 to 8989ec2 Compare November 12, 2024 13:12
The code changes introduce two new API endpoints, `get_companies` and `get_company`, to retrieve information about companies. These endpoints are implemented in separate modules within the `handlers` module. The `get_companies` endpoint returns a list of all companies, while the `get_company` endpoint retrieves a specific company by its ID.

Note: The recent user commits and repository commits are not relevant for generating the commit message.
Signed-off-by: nathaelbonnal <pro.nathaelbonnal@gmail.com>
This commit adds the `find_all` method to the `CompanyService` trait. The method retrieves a list of all companies and returns a `Result` containing the list of companies or an error of type `CompanyError`. This method will be implemented in the `CompanyServiceImpl` struct.

Note: The recent user commits and repository commits are not relevant for generating the commit message.
Signed-off-by: nathaelbonnal <pro.nathaelbonnal@gmail.com>
This commit implements the `find_all` method in the `CompanyRepository` trait. The method retrieves all companies from the Neo4j database and returns a `Result` containing the list of companies or a `CompanyError` if an error occurs during the retrieval process.

Note: The recent user commits and repository commits are not relevant for generating the commit message.
Signed-off-by: nathaelbonnal <pro.nathaelbonnal@gmail.com>
Signed-off-by: nathaelbonnal <pro.nathaelbonnal@gmail.com>
@NathaelB NathaelB force-pushed the 4-create-endpoint-to-get-a-specific-company branch from 8989ec2 to a7139e4 Compare November 12, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create endpoint to get a specific company

1 participant