#822-endpoint-update-for-TemperatureAllView #854
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!854
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#822-endpoint-update-for-TemperatureAllView"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
Issue:
General: #822
Review on #854
Whats done
Tested on macOS using Chrome
Inspected following files
TempEndpoints.cs
DatabaseQueries.cs
IDatabaseQueries.cs
TempService.cs
ITempService.cs
+ Follows standard
entryPoint/nginx.conf
+ Follows standard
What needs to be done
Conclusion