Added devices and companies models
This commit is contained in:
19
controllers/CompaniesController.go
Normal file
19
controllers/CompaniesController.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package controllers
|
||||
|
||||
// import (
|
||||
// "net/http"
|
||||
// models "novatech/models"
|
||||
|
||||
// "github.com/VoidArtanis/go-rest-boilerplate/models"
|
||||
// "github.com/gin-gonic/gin"
|
||||
// )
|
||||
|
||||
// func Companies(c *gin.Context) {
|
||||
// var companies []models.Company
|
||||
// // Fetch companies from DB here
|
||||
// if err := models.FetchCompanies(&companies); err != nil {
|
||||
// c.JSON(http.StatusInternalServerError, gin.H{"error": "Error fetching companies"})
|
||||
// return
|
||||
// }
|
||||
// c.JSON(http.StatusOK, gin.H{"companies": companies})
|
||||
// }
|
||||
Reference in New Issue
Block a user