mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
chore(backend): update version and build_time in GetStat function to use environment variables for better tracking
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/samber/lo"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
type FileChartData struct {
|
||||
@@ -83,7 +84,8 @@ func GetStat(c echo.Context) error {
|
||||
})
|
||||
|
||||
return utils.HTTPSuccessHandler(c, map[string]any{
|
||||
"version": "0.1.0",
|
||||
"version": utils.GetEnvWithDefault("VERSION", "dev"),
|
||||
"build_time": cast.ToInt(utils.GetEnvWithDefault("BUILD_TIME", cast.ToString(time.Now().Unix()))),
|
||||
"max_limit": map[string]any{
|
||||
"file_size": maxStorageSize,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user