2023-12-21 16:04:04 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.myservermanager.com/varakh/upda/api"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
type infoHandler struct {
|
|
|
|
appConfig appConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
func newInfoHandler(a *appConfig) *infoHandler {
|
|
|
|
return &infoHandler{appConfig: *a}
|
|
|
|
}
|
|
|
|
|
2024-01-24 23:08:26 +00:00
|
|
|
func (h *infoHandler) show(c *gin.Context) {
|
2023-12-21 16:04:04 +00:00
|
|
|
c.JSON(http.StatusOK, api.DataResponse{Data: gin.H{
|
|
|
|
"name": Name,
|
|
|
|
"version": Version,
|
|
|
|
"timeZone": h.appConfig.timeZone,
|
|
|
|
}})
|
|
|
|
}
|