Added devices and companies models

This commit is contained in:
Nedim
2023-09-06 11:58:33 +02:00
parent 8bbfa53d42
commit 40c6366608
10 changed files with 116 additions and 21 deletions

View 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})
// }