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

Revise API Request/Response Objects #223

Open
maakinoh opened this issue Sep 8, 2024 · 0 comments
Open

Revise API Request/Response Objects #223

maakinoh opened this issue Sep 8, 2024 · 0 comments
Assignees
Labels
enhancement Improvements to existing features with relevant impact nice to have Low priority issues that improve quality of life

Comments

@maakinoh
Copy link
Contributor

maakinoh commented Sep 8, 2024

For EF29 or the future, it may be nice to revise the HTTP API to use DTOs instead of the real database records.

Currently, we have some controllers which are using the raw records like DealersController:

public async Task<ActionResult> PostDealerAsync([EnsureNotNull][FromBody] DealerRecord record)

And some who don't like FursuitController:

public async Task<ActionResult> PostFursuitBadgeRegistrationAsync([FromBody] FursuitBadgeRegistration registration)

Working with the raw DB records can cause some problems like ID collisions and exposing sensitive or unneeded information.

I suggest could we implement a uniform DTO system for each request/response/database record.

This also relates to #131

@maakinoh maakinoh added enhancement Improvements to existing features with relevant impact nice to have Low priority issues that improve quality of life labels Sep 8, 2024
@maakinoh maakinoh self-assigned this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features with relevant impact nice to have Low priority issues that improve quality of life
Projects
None yet
Development

No branches or pull requests

1 participant