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{
|
2024-06-10 18:03:25 +00:00
|
|
|
"name": name,
|
|
|
|
"version": version,
|
2023-12-21 16:04:04 +00:00
|
|
|
"timeZone": h.appConfig.timeZone,
|
|
|
|
}})
|
|
|
|
}
|