Files
crawlab/core/controllers/system_info.go
Marvin Zhang 23cad00d92 refactor: streamline controller methods and enhance parameter handling
- Refactored multiple controller methods to accept structured parameters for improved clarity and maintainability.
- Consolidated error handling and response generation across various endpoints.
- Updated function signatures to eliminate unnecessary context parameters and enhance type safety.
- Improved consistency in response formatting and error handling across controllers.
- Enhanced file handling methods to support multipart file uploads and directory operations more effectively.
2025-03-13 17:37:30 +08:00

16 lines
367 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) (response *Response[entity.SystemInfo], err error) {
info := entity.SystemInfo{
Edition: utils.GetEdition(),
Version: utils.GetVersion(),
}
return GetDataResponse(info)
}