fasten-onprem/backend/pkg/web/handler/hello_world.go

36 lines
1.1 KiB
Go

package handler
import (
//"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/database"
"github.com/gin-gonic/gin"
//"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/config"
//"github.com/sirupsen/logrus"
"net/http"
)
func GetHelloWorld(c *gin.Context) {
//logger := c.MustGet("LOGGER").(*logrus.Entry)
//appConfig := c.MustGet("CONFIG").(config.Interface)
//device, err := deviceRepo.GetDeviceDetails(c, c.Param("wwn"))
//if err != nil {
// logger.Errorln("An error occurred while retrieving device details", err)
// c.JSON(http.StatusInternalServerError, gin.H{"success": false})
// return
//}
//
//durationKey, exists := c.GetQuery("duration_key")
//if !exists {
// durationKey = "forever"
//}
//
//smartResults, err := deviceRepo.GetSmartAttributeHistory(c, c.Param("wwn"), durationKey, nil)
//if err != nil {
// logger.Errorln("An error occurred while retrieving device smart results", err)
// c.JSON(http.StatusInternalServerError, gin.H{"success": false})
// return
//}
c.JSON(http.StatusOK, gin.H{"success": true, "data": map[string]interface{}{"hello": "world"}})
}