Files
crawlab/core/controllers/system_info.go
Marvin Zhang 54800974eb feat: refactor system info retrieval and enhance logo output
- Replaced viper calls with utility functions in GetSystemInfo to improve code clarity and maintainability.
- Added a new system.go file with utility functions for retrieving system version and edition information.
- Enhanced PrintLogoWithWelcomeInfo to include detailed system information, improving user experience during server startup.
- Updated output formatting for better readability and consistency in welcome messages.
2024-12-29 19:01:23 +08:00

16 lines
319 B
Go

package controllers
import (
"github.com/crawlab-team/crawlab/core/entity"
"github.com/crawlab-team/crawlab/core/utils"
"github.com/gin-gonic/gin"
)
func GetSystemInfo(c *gin.Context) {
info := &entity.SystemInfo{
Edition: utils.GetEdition(),
Version: utils.GetVersion(),
}
HandleSuccessWithData(c, info)
}