[LOCKLITE-89] Create API route for get my vaults#52
Merged
Conversation
1 similar comment
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new API route for retrieving the current user's vaults. The implementation follows established patterns in the codebase with proper layering through use cases, repositories, and adapters.
- Creates a new GET endpoint at
/api/vaultsthat returns user vaults - Implements supporting infrastructure including use case, repository method, and response DTOs
- Updates the vault adapter to handle list transformations and adds interface consistency
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/modules/shared/dto/responses/get-my-vaults.response.dto.ts |
Defines response DTO for get my vaults API with Swagger documentation |
src/modules/shared/dto/responses/create-vault.response.dto.ts |
Updates Swagger property name from 'vault' to 'vaultCreated' |
src/modules/api/usecases/vaults/get-my-vaults.usecase.ts |
Implements use case for retrieving user vaults with TODO for user filtering |
src/modules/api/repositories/vaults.repository.ts |
Adds findAll method to retrieve all vaults from database |
src/modules/api/adapters/vault.adapter.ts |
Adds list transformation method and simplifies single model transformation |
src/modules/api/adapters/abstract/adapter.interface.ts |
Extends adapter interface to include list transformation method |
src/app/api/vaults/route.ts |
Implements GET endpoint with Swagger documentation and error handling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.