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

Moving most public types to API layer #452

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jennymar
Copy link

Info

Closes #326

Description

What changes did you make? List all distinct problems that this PR addresses. Explain any relevant
motivation or context.

Changes were made to almost all the controller classes in the API layer, as well as their corresponding service classes in the service layer. The mapping of private to public types was moved from the service layer to the API layer.

Changes

API Layer

  • AdminController.ts
  • AttendanceController.ts
  • EventController.ts
  • FeedbackController.ts
  • LeaderboardController.ts
  • MerchStoreController.ts
  • UserController.ts

Service Layer

  • AttendanceService.ts
  • EventService.ts
  • FeedbackService.ts
  • MerchStoreService.ts
  • UserAccountService.ts

Type of Change

  • Patch (non-breaking change/bugfix)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to not work as
    expected)
  • Documentation (A change to a README/description)
  • Continuous Integration/DevOps Change (Related to deployment steps, continuous integration
    workflows, linting, etc.)
  • Other: (Fill In)

If you've selected Patch, Minor, or Major as your change type, make sure to bump the version before merging in package.json!

Testing

I have tested that my changes fully resolve the linked issue ...

  • locally.
  • on the testing API/testing database.
  • with appropriate Postman routes. Screenshots are included below.

Checklist

  • I have performed a self-review of my own code.
  • I have followed the style guidelines of this project.
  • I have appropriately edited the API version in the package.json file.
  • My changes produce no new warnings.

Screenshots

Please include a screenshot of your Postman testing passing successfully.

Copy link

Thanks for contributing!
If you've made changes to the API's functionality, please make sure to bump the package
version—see this guide to semantic versioning for details—and
document those changes as appropriate.

@jennymar jennymar marked this pull request as ready for review October 11, 2024 02:06
@maxwn04
Copy link
Contributor

maxwn04 commented Oct 11, 2024

Are we keeping the user profile routes in UserAccountService the same? I think we can still add resumes/social media to the UserModel. Maybe we can change the query as well but that might affect other routes.

public async getFullUserProfile(user: UserModel) : Promise<PrivateProfile> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move mapping of private to public types from service layer to API layer
2 participants