#845-new-energy-endpoints #994
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!994
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#845-new-energy-endpoints"
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?
Created new Endpoints for getting total energy used during a month from one sensor or all sensors combined
csproj.lscache files are created automatically, they are safe to remove but they get created again anyway when running. They contain no code just descriptions and i don't know why they started appearing if not for a vscode update, as the C# dev kit in vscode keeps creating it.
to test the endpoints use
/energy/total/{sensorid}/{year}/{month}
and
/energy/total/{year}/{month}
There seems to be something wonky with the PostgreSQL as i have multiple times on this branch and on the week 6 team branch gotten a dependency error of the PostgreSQL being unhealthy, this dosent always happen but it still occurs frequently. This is most likely an error of the PostgreSQL building out of order to early. if this happens during testing cd into DockerCompose/ and run:
sudo docker compose up -d entryPoint
or
docker compose up -d entryPoint
or start the entryPoint container again through Docker desktop if you want to.
Either of these three work as they just do the same thing. The first one always works for me.
related issue #845
Review on #845
Whats done
Looked over code and tested the endpoints in terminal
Tested on Windows 11 using Chrome
Inspected following files [IMPORTANT!, Don't forget to inspect for unapproved dependencies in package.json ]
What needs to be done
Format DatabaseQueries.cs and IDatabaseQueries.cs
Conclusion
Endpoints work and everything looks good so it can be merged as soon as formatting is done.
Fixed the formatting of IDatabaseQueries and DatabaseQueries to match those in other services
@b24hugst Is this ready to be merged?
It still change formatting when I save the file. I'll show what I mean exactly.
That is one example from DatabaseQueries.cs:
Pre-save

After-save

Do you maybe not have the correct format-on-save option for c#?
I experienced the same problem as @b24hugst . Check the wiki here for the correct formatter: https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Formatter. Also, is there a way to remove the cache files från the pull request? They do not need to be merged with the PR.
Formatter borde nu vara fixad och korrekt formatterad och alla lscache filer har tagits bort
Looks good!