Added measurements, and devices statsh

Added stats endpoints
This commit is contained in:
Nedim
2023-10-20 12:03:59 +02:00
parent 6892c56c1e
commit d40b225e4e
12 changed files with 1120 additions and 5 deletions

View File

@@ -38,7 +38,14 @@ func RegisterPublicRoutes(r *gin.Engine) {
// Locations
r.GET("/locations", controllers.SearchPlace)
// Notifications
r.GET("/notifications", controllers.GetNotifications)
// Stats
r.GET("/stats/measurements", controllers.GetCompanyRelatedDeviceInfoCount)
r.GET("/stats/devices", controllers.GetCompanyRelatedDeviceInfoCountWithTempRange)
r.GET("/stats/contracts", controllers.GetContractCountByStatus)
r.GET("/stats/contracts/total", controllers.GetTotalContractCount)
r.GET("/stats/invoices", controllers.GetInvoiceCountByStatus)
r.GET("/stats/milestones", controllers.GetContractsMatchingDeviceLocation)
}