mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- 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.
16 lines
319 B
Go
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)
|
|
}
|