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

Solo project GET all endpoint #223

Merged
merged 20 commits into from
Nov 22, 2024
Merged

Solo project GET all endpoint #223

merged 20 commits into from
Nov 22, 2024

Conversation

cherylli
Copy link
Contributor

Description

Add GET endpoint for solo project. Authorization, e2e tests, and unit tests will be done in the next PR.

I'm unsure what is the best way to format the comments, now they are just all included. There are a few options I've considered, noted in google docs, which can be updated later on

Issue link

https://app.clickup.com/t/86b1dafqa

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested on swagger, ran all the tests to make sure existing tests pass

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

… formatting logic to improve code clarity and maintainability

feat(solo-projects.service.ts): add UserWithProfile and SoloProjectWithPayload types to enhance type safety and data handling
…grity

refactor(services): simplify user selection in SoloProject service and include comments and status for enhanced project details
…for testing

feat(controllers): implement pagination for fetching solo projects with offset and page size
refactor(services): update getAllSoloProjects method to support pagination and return metadata along with data
…categories to voyage teams

feat(src/solo-projects/solo-projects.controller.ts): add support for sorting solo projects by status, createdAt, and updatedAt
feat(src/solo-projects/solo-projects.service.ts): implement sorting of solo projects based on the provided sort parameter

The changes in this commit are as follows:

1. In the `prisma/seed/voyage-teams.ts` file, the `populateVoyageTeams` function was updated to add tech stack categories to the voyage teams. This will allow the application to associate specific tech stacks with each voyage team.

2. In the `src/solo-projects/solo-projects.controller.ts` file, the `getAllSoloProjects` method was updated to accept a new `sort` query parameter. This parameter allows the client to sort the solo projects by status, createdAt, and updatedAt in ascending or descending order.

3. In the `src/solo-projects/solo-projects.service.ts` file, the `getAllSoloProjects` method was updated to handle the sorting of solo projects based on the provided `sort` parameter. This will enable the application to display the solo projects in the desired order.

These changes will improve the functionality of the application by allowing users to better manage and organize the solo projects, as well as associate relevant tech stacks with the voyage teams.
…clude responseGroup and its responses

feat(solo-projects.service.ts): add responseGroup and its responses to the formatted solo project data
chore(solo-projects.e2e-spec.ts): add empty e2e test file for solo projects
…input type to solo project form

fix(prisma/seed/responses/helper.ts): remove unnecessary console.log statement
feat(prisma/seed/solo-project.ts): add new solo project with option choices for "Tier" question
feat(src/global/global.service.ts): add new formatResponses function to transform response data into a more readable format
feat(src/solo-projects/solo-projects.service.ts): update formatSoloProject function to use the new formatResponses function and include the input type information for each question
…d github profile information from user's OAuth profiles

feat(global/selects/users.select.ts): add providerUserId field to user OAuth profile select
feat(global/types/users.types.ts): add providerUserId field to UserWithProfile type
feat(solo-projects/solo-projects.controller.ts): add ApiResponse for getAllSoloProjects endpoint to document the response schema
feat(solo-projects/solo-projects.response.ts): create a response DTO to document the structure of the solo projects response
refactor(solo-projects/solo-projects.service.ts): update the formatSoloProject method to include createdAt and updatedAt fields in the response
…ent class to support nested comments

feat(solo-projects.response.ts): add SoloProjectResponseMeta class to encapsulate pagination metadata
feat(solo-projects.response.ts): update SoloProjectsResponse class to include data and meta properties for a more structured response
…uestException for invalid sort field

refactor(pipes): remove IntDefaultValuePipe and replace it with NonNegativeIntDefaultValuePipe to handle negative values
feat(solo-projects.controller.ts): add Swagger documentation for the getAllSoloProjects endpoint, including error responses
@cherylli cherylli self-assigned this Nov 20, 2024
Copy link

@timDeHof, @JoshuaHinman
One business day has passed since the review started. Give priority to reviews as much as possible.

Copy link
Contributor

@timDeHof timDeHof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests passed and endpoints returned success in swagger.

Copy link
Contributor

@JoshuaHinman JoshuaHinman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests passed and all options worked on swagger

@cherylli cherylli merged commit 5cab23e into dev Nov 22, 2024
1 check passed
@cherylli cherylli deleted the feature/solo-project-endpoints branch November 22, 2024 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants