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

Update post and put routes #78

Merged
merged 7 commits into from
Nov 13, 2024
Merged

Update post and put routes #78

merged 7 commits into from
Nov 13, 2024

Conversation

mlan225
Copy link
Member

@mlan225 mlan225 commented Nov 8, 2024

Resolves #77

Update the post and put methods in base method and all controllers and clients that inherit it.

Clients updated:

  • AuthenticatedClient.cs
  • IBaseClient.cs

Controllers updated:

  • FormsController.cs
  • LookupsController.cs
  • PacketsController.cs
  • ParticipationsController.cs
  • VisitsController.cs

@mlan225 mlan225 marked this pull request as draft November 8, 2024 22:12
@mlan225
Copy link
Member Author

mlan225 commented Nov 8, 2024

Wondering if we are okay with returning nulls or if we want to specify return messages

@ashleybot
Copy link
Member

Wondering if we are okay with returning nulls or if we want to specify return messages

@mlan225 instead of null, let's return the originally submitted object here.

@mlan225
Copy link
Member Author

mlan225 commented Nov 11, 2024

updated to preview version for checking with the front end application

Updated clients

BaseClient

  • Post and put methods return type T

authenticatedClient

  • Return deserialized response in post and put methods

Updated controllers

Forms controller:

  • methods not implemented

lookups controller:

  • methods not implemented

packets controller

  • post task returns "not implemented"
  • put returns dto after saving to context

participations controller

  • post and put return a dto after saving to context

visits controller

  • post and put return dtos

Version updates (to preview 4.3.0-preview.1)

  • uds.net.dto
  • uds.net.api
  • uds.net.mvc

@mlan225
Copy link
Member Author

mlan225 commented Nov 11, 2024

Updated the returns for methods

  • nulls return the original DTO
  • successful methods return the updated DTO

preview version updated to preview.2

@mlan225 mlan225 marked this pull request as ready for review November 11, 2024 21:39
Copy link
Member

@ashleybot ashleybot left a comment

Choose a reason for hiding this comment

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

@mlan225 Good to merge! Process is to bump to 4.3.0, merge commit to main, tag the merge commit with v4.3.0 and push to build packages.

@mlan225 mlan225 merged commit b47f605 into main Nov 13, 2024
1 check passed
@mlan225 mlan225 deleted the update-post-and-put-methods branch November 13, 2024 16:20
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.

Update all Post and Put methods to return newly created or updated object
2 participants