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

246 code cleanup #345

Merged
merged 7 commits into from
Jan 30, 2021
Merged

Conversation

decembrya
Copy link
Contributor

@decembrya decembrya commented Nov 13, 2020

What does it fix?

First PR for
#246

cleanup and organise classes
rename everything to english
this PR affects only the Answer endpoints, namely:

  • GET ​/api​/v1​/answers

  • POST ​/api​/v1​/answers

  • GET ​/api​/v1​/answers​/filledIn

  • GET ​/api​/v1​/answers​/pollingStationInfo

How has it been tested?

tested manually and ran the available unit test

changes were done to some of the contracts, this will impact the client and changes will be needed there as well

@@ -88,16 +84,16 @@ public async Task<PollingStationInfosDTO> GetRaspunsuriFormular(ObserverAnswersR
/// <code>IsFreeText = true</code></param>
/// <returns></returns>
[HttpPost]
[Authorize("Observer")]
public async Task<IActionResult> PostAnswer([FromBody] AnswerModelWrapper answerModel)
//[Authorize("Observer")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, good catch

@sandrohanea
Copy link
Contributor

In order to ensure backward compatibility, I think we need to move this to a v2 endpoint and keep the old model for the v1 controller.
@aniri, do we want to have backward compatibility with old clients for this controller?

@idormenco
Copy link
Member

@sandrohanea we will merge it like this (knowing it will break the contract) and I will update the ui also.

@catileptic catileptic merged commit c57f014 into code4romania:develop Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants