Create an endpoint that will take in the secretId and environmentId and return all the revisions that exist for the secret. The endpoint will look like this:
GET /api/secret/:secretId/revisions/:environmentId
Solution
We highly encourage you to go through the existing code to understand how permissions work, and reuse it in your function.
Feature implementation
Update secret.service.ts to include a method named getRevisionsOfSecret
Description
Create an endpoint that will take in the
secretId
andenvironmentId
and return all the revisions that exist for the secret. The endpoint will look like this:Solution
We highly encourage you to go through the existing code to understand how permissions work, and reuse it in your function.
Feature implementation
secret.service.ts
to include a method namedgetRevisionsOfSecret
secret.controller.ts
to link an endpoint for the service functionTests
Add the following tests in
secret.e2e.spec.ts
[]
if the secret has no revision