#822-endpoint-update-for-TemperatureAllView #854

Merged
a22erigr merged 3 commits from #822-endpoint-update-for-TemperatureAllView into team_2_week_5 2026-05-11 11:07:08 +00:00
Collaborator

Update the tempservice endpoints to work as before

Environment

This was developed on an Arch-based Linux distribution and tested using Jest.

What has been done?

  • I update the "entryPoint/nginx.conf" so that the tempature service correctly maps to "http://tempService:8080/" instead of "http://tempService:8080/temperature/"

  • In service/tempService/tempService/DatabaseLogic/DatabaseQueries.cs, I added a function to get the newest temperature per timestamp per sensor. The method is called "FetchAllSensorsLatest".

  • In "service/tempService/tempService/Services/TempService.cs", I simply added the function to call the database and give the results or an error "No result." The method is called "GetAllSensorsLatestAsync".

  • In "service/tempService/tempService/Endpoints/TempEndpoints.cs", I updated the mapping to not include temperature anymore (otherwise it would be localhost/api/temperature/temperature/latest). And I then added "/latest" to work as before the refactor.

  • Generally in "service/tempService/tempService/Endpoints/TempEndpoints.cs" and "service/tempService/tempService/DatabaseLogic/DatabaseQueries.cs" I also did a light cleanup of the code.

image

Issue:

General: #822

# Update the tempservice endpoints to work as before ## Environment This was developed on an Arch-based Linux distribution and tested using Jest. ## What has been done? * I update the "**entryPoint/nginx.conf**" so that the tempature service correctly maps to "_http://tempService:8080/_" instead of "_http://tempService:8080/temperature/_" * In **service/tempService/tempService/DatabaseLogic/DatabaseQueries.cs**, I added a function to get the newest temperature per timestamp per sensor. The method is called "FetchAllSensorsLatest". * In "**service/tempService/tempService/Services/TempService.cs**", I simply added the function to call the database and give the results or an error "No result." The method is called "GetAllSensorsLatestAsync". * In "**service/tempService/tempService/Endpoints/TempEndpoints.cs**", I updated the mapping to not include temperature anymore (otherwise it would be localhost/api/temperature/temperature/latest). And I then added "_/latest_" to work as before the refactor. * Generally in "**service/tempService/tempService/Endpoints/TempEndpoints.cs**" and "**service/tempService/tempService/DatabaseLogic/DatabaseQueries.cs**" I also did a light cleanup of the code. ![image](/attachments/c337a06b-7dd4-4e61-953b-feb2b05ab375) ## Issue: General: #822
a22erigr 2026-05-08 14:36:10 +00:00
Collaborator

Review on #854

Whats done

Tested on macOS using Chrome

  • App starts
    • Tested TemperatureView
      • Temeperature data loads correctly
      • Switching sensors works
    • Tested TemperatureAllView
      • All sensor temperatures now loads correctly
    • Tested TemperatureMonthView and TemperatureYearView
      • Temperature averages load correctly

Inspected following files

  • TempEndpoints.cs

    • Indentation/code styling
      • Follows standard
    • Naming convention
      • Follows standard
    • General code quality
      • Cleanup and endpoint updates work correctly after testing
  • DatabaseQueries.cs

    • Indentation/code styling
      • Follows standard
    • Naming convention
      • Follows standard
    • Comments
      • Looks good
    • General code quality
      • Latest sensor data is fetched correctly
  • IDatabaseQueries.cs

    • Indentation/code styling
      • Follows standard
    • Naming convention
      • Follows standard
    • General code quality
      • No issues found
  • TempService.cs

    • Indentation/code styling
      • Follows standard
    • Naming convention
      • Follows standard
    • Comments
      • Looks good
    • General code quality
      • Service updates correctly handle the new latest sensor endpoint
  • ITempService.cs

    • Indentation/code styling
      + Follows standard
      • Naming convention
        • Follows standard
      • General code quality
        • No issues found
  • entryPoint/nginx.conf

    • Indentation/code styling
      + Follows standard
      • Naming convention
        • Follows standard
      • General code quality
        • No issues found

What needs to be done

  • No issues found

Conclusion

  • Works as intended and the code is ready to be merged.
# Review on #854 ## Whats done ### Tested on macOS using Chrome + App starts + Tested TemperatureView + Temeperature data loads correctly + Switching sensors works + Tested TemperatureAllView + All sensor temperatures now loads correctly + Tested TemperatureMonthView and TemperatureYearView + Temperature averages load correctly ### Inspected following files + TempEndpoints.cs + Indentation/code styling + Follows standard + Naming convention + Follows standard + General code quality + Cleanup and endpoint updates work correctly after testing + DatabaseQueries.cs + Indentation/code styling + Follows standard + Naming convention + Follows standard + Comments + Looks good + General code quality + Latest sensor data is fetched correctly + IDatabaseQueries.cs + Indentation/code styling + Follows standard + Naming convention + Follows standard + General code quality + No issues found + TempService.cs + Indentation/code styling + Follows standard + Naming convention + Follows standard + Comments + Looks good + General code quality + Service updates correctly handle the new latest sensor endpoint + ITempService.cs + Indentation/code styling + Follows standard + Naming convention + Follows standard + General code quality + No issues found + entryPoint/nginx.conf + Indentation/code styling + Follows standard + Naming convention + Follows standard + General code quality + No issues found ## What needs to be done + No issues found ## Conclusion + Works as intended and the code is ready to be merged.
Collaborator
No description provided.
a22erigr merged commit cfd602176f into team_2_week_5 2026-05-11 11:07:08 +00:00
a22erigr deleted branch #822-endpoint-update-for-TemperatureAllView 2026-05-11 18:20:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!854
No description provided.