cyntaria / ConstructionERP-Backend

A REST API backend system for the construction ERP software made with NodeJS
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

As a contractor, I should be able to get details of a single role, so that I can understand which person is it for #34

Open arafaysaleem opened 3 years ago

arafaysaleem commented 3 years ago

Summary

As a contractor, I should be able to get details of a single role, so that I can understand which person is it for.

Acceptance Criteria

GIVEN a contractor is requesting details of a role in the desktop app WHEN the app hits the roles/:id endpoint with a valid GET request, containing the path parameter:

THEN the app should receive a status 200 AND in the response, the following information should be returned:

Sample Request/Sample Response

headers: {
    error: 0,
    message: "..."
}
body: {
    role_id: 0,
    role: "home_owner"
    role_type: "app_user"
}

Resources

Dev Notes

{Some complementary notes if necessary}

Testing Notes

GIVEN a contractor is requesting details of a role in the desktop app WHEN the app hits the roles/:id endpoint with a valid GET request, containing the path parameter:

THEN the app should receive a status 200 AND the {id} in the body should be same as the :id in the path parameter