You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a new Company module, with CompanyController and CompanyService classes similar to what can be found for the UserModule. Create an endpoint that, given a company ID, gets the company data and all the user data or at least user IDs for that company.
Currently, there is a BreaktimeCompanyToUsers table in DynamoDB. In the backend code, there is a method called GetCompanyData in apps/backend/src/dynamodb.ts:88 that can read the data from this table and return it formatted as CompanySchema found in apps/backend/src/db/schemas/CompanyUsers.ts.
There should be a getCompany(<companyId>) endpoint on the backend that will return the data from this table for a given company.
The schema for a company and the data that is returned by this endpoint should be:
If there is no company that can be found from the given companyId, the endpoint should return an error, like a 404 Not Found.
As a stretch goal, the endpoint should retrieve the UserData for each associate and supervisor (this can be done by utilizing the existing methods in UserService and combine that data in the response, so the return schema looks like:
Implement a new
Company
module, withCompanyController
andCompanyService
classes similar to what can be found for theUserModule
. Create an endpoint that, given a company ID, gets the company data and all the user data or at least user IDs for that company.Currently, there is a
BreaktimeCompanyToUsers
table in DynamoDB. In the backend code, there is a method calledGetCompanyData
inapps/backend/src/dynamodb.ts:88
that can read the data from this table and return it formatted asCompanySchema
found inapps/backend/src/db/schemas/CompanyUsers.ts
.There should be a
getCompany(<companyId>)
endpoint on the backend that will return the data from this table for a given company.The schema for a company and the data that is returned by this endpoint should be:
If there is no company that can be found from the given companyId, the endpoint should return an error, like a
404 Not Found
.As a stretch goal, the endpoint should retrieve the UserData for each associate and supervisor (this can be done by utilizing the existing methods in
UserService
and combine that data in the response, so the return schema looks like:The text was updated successfully, but these errors were encountered: