Added route for saving device info
This commit is contained in:
5
main.go
5
main.go
@@ -11,7 +11,6 @@ import (
|
||||
"gitlab.com/pactual1/backend/services/contact"
|
||||
"gitlab.com/pactual1/backend/services/erp"
|
||||
"gitlab.com/pactual1/backend/services/messaging"
|
||||
"gitlab.com/pactual1/backend/services/sensor"
|
||||
"gitlab.com/pactual1/backend/shared"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -44,6 +43,7 @@ func main() {
|
||||
company := Admin.AddResource(&models.Company{})
|
||||
company.Meta(&admin.Meta{Name: "Users", Config: &admin.SelectManyConfig{SelectMode: "bottom_sheet"}})
|
||||
company.Meta(&admin.Meta{Name: "Devices", Config: &admin.SelectManyConfig{SelectMode: "bottom_sheet"}})
|
||||
// company.Meta(&admin.Meta{Name: "DeviceInfos", Config: &admin.SelectManyConfig{SelectMode: "bottom_sheet"}})
|
||||
|
||||
// Add User and Device resources
|
||||
Admin.AddResource(&models.User{})
|
||||
@@ -63,19 +63,16 @@ func main() {
|
||||
// Initialize channels
|
||||
messagingChannel := make(chan string)
|
||||
erpChannel := make(chan string)
|
||||
sensorChannel := make(chan string)
|
||||
contactChannel := make(chan string)
|
||||
|
||||
// Start services and pass the respective channels
|
||||
go messaging.MessagingService(messagingChannel)
|
||||
go erp.ERPService(erpChannel)
|
||||
go sensor.SensorService(sensorChannel)
|
||||
go contact.ContactService(contactChannel)
|
||||
|
||||
// Sending messages via channels
|
||||
messagingChannel <- "Send an email"
|
||||
erpChannel <- "Update ERP record"
|
||||
sensorChannel <- "Trigger sensor"
|
||||
contactChannel <- "Update contact info"
|
||||
|
||||
// Initialize Gin
|
||||
|
||||
Reference in New Issue
Block a user