Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Create endpoint for fetching all revisions of a secret #272

Closed
rajdip-b opened this issue Jun 12, 2024 · 2 comments · Fixed by #303
Closed

API: Create endpoint for fetching all revisions of a secret #272

rajdip-b opened this issue Jun 12, 2024 · 2 comments · Fixed by #303
Assignees
Labels
difficulty: 2 foss hack Clustering all the curated issues for Foss Hack 2024 good first issue Good for newcomers priority: high scope: api Everything related to the API type: feature Release drafter tag for tagging PRs related to adding new features

Comments

@rajdip-b
Copy link
Member

Description

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

Tests

Add the following tests in secret.e2e.spec.ts

  • should be able to fetch all revisions (2-3) of a secret
  • should return [] if the secret has no revision
  • should throw an error if the secret does not exist
  • should throw an error if the secret is not accessible by the user
@rajdip-b rajdip-b added good first issue Good for newcomers scope: api Everything related to the API type: feature Release drafter tag for tagging PRs related to adding new features priority: high foss hack Clustering all the curated issues for Foss Hack 2024 difficulty: 2 labels Jun 12, 2024
@anudeeps352
Copy link
Contributor

/attempt

Copy link

Assigned the issue to @anudeeps352!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 2 foss hack Clustering all the curated issues for Foss Hack 2024 good first issue Good for newcomers priority: high scope: api Everything related to the API type: feature Release drafter tag for tagging PRs related to adding new features
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants