#822-endpoint-update-for-TemperatureAllView #854
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked-waiting-for-further-changes
bug
bug-only-on-server-for-mobile-not-webpage
Bug-Report-After-Merge
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
further-changes-needed
future-problem-not-fixint-this-period
help wanted
invalid
last-week-issue-to-fix
library
low-priority
needs input
needs review
not-implemented.
project documentation
question
research
reviewed
Script
security
SQL
style
Team 1
Team 2
team leaders
test-creation
testing
topLevel
unassigned
Under-review
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