#298-update-delete-middleware #349

Merged
b24johka merged 9 commits from #298-update-delete-middleware into team_1_week_2 2026-04-17 08:09:40 +00:00
Collaborator

Modified the middleware to be able to update and delete in the database

  • updated the basic structure
  • changed the current readmockups to use the new version
  • fixed bug in roombookingapimockup
  • instructions on how to use in README in middleware
Modified the middleware to be able to update and delete in the database - updated the basic structure - changed the current readmockups to use the new version - fixed bug in roombookingapimockup - instructions on how to use in README in middleware
f21marfo left a comment
Collaborator

Review:

Code appears to follow established coding standards, new methods are have good documentation. However there is a lack of descriptive comments that explains what different sections of code are actually doing.
Main() is completely devoid of comments.

Built and test-ran application, all current app pages displaying as expected. Currently no way to test update and deletion methods, suggest creation of unit tests for the new methods.

Additional recommendations:

  • the if and elseif (action == ) statements in middleware/Program.cs could be more cleanly expressed as a switch statement.
  • Methods lack error handling
  • !!!UpdateMessage is not atomic, risk of race condition. Needs to be rewritten as a true SQL UPDATE-query!!!
Review: Code appears to follow established coding standards, new methods are have good documentation. However there is a lack of descriptive comments that explains what different sections of code are actually doing. Main() is completely devoid of comments. Built and test-ran application, all current app pages displaying as expected. Currently no way to test update and deletion methods, suggest creation of unit tests for the new methods. Additional recommendations: - the if and elseif (action == ) statements in middleware/Program.cs could be more cleanly expressed as a switch statement. - Methods lack error handling - !!!UpdateMessage is not atomic, risk of race condition. Needs to be rewritten as a true SQL UPDATE-query!!!
Author
Collaborator

will try to fix everything, would appreciate if someone knew how to do the update, could not find how to update the whole row(without complex sql query)

will try to fix everything, would appreciate if someone knew how to do the update, could not find how to update the whole row(without complex sql query)
Collaborator

With the current "payload" i do not believe it is even possible to do it, without a complex sql query, since we are cramming an entire row into a single string. In fact I believe that is part of the problem that issue #19 is intended to solve.

With the current "payload" i do not believe it is even possible to do it, without a complex sql query, since we are cramming an entire row into a single string. In fact I believe that is part of the problem that issue #19 is intended to solve.
Author
Collaborator

then i think it would be best to merg this as it is and then we could work on that on this version, i may even take on issue #19 because i have worked some with how middleware works.

then i think it would be best to merg this as it is and then we could work on that on this version, i may even take on issue #19 because i have worked some with how middleware works.
Collaborator

I have been talking to the developer and we have decided that this pull request will spawn some new issues related to the reviewers feedback. The review has been conducted in a good fashion, this will be merged directly.

I have been talking to the developer and we have decided that this pull request will spawn some new issues related to the reviewers feedback. The review has been conducted in a good fashion, this will be merged directly.
b24johka merged commit e76bc56e0d into team_1_week_2 2026-04-17 08:09:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!349
No description provided.