mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-07-12 16:02:18 +08:00
first commit
This commit is contained in:
19
server/internal/http/system_handler.go
Normal file
19
server/internal/http/system_handler.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"backupx/server/internal/service"
|
||||
"backupx/server/pkg/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type SystemHandler struct {
|
||||
systemService *service.SystemService
|
||||
}
|
||||
|
||||
func NewSystemHandler(systemService *service.SystemService) *SystemHandler {
|
||||
return &SystemHandler{systemService: systemService}
|
||||
}
|
||||
|
||||
func (h *SystemHandler) Info(c *gin.Context) {
|
||||
response.Success(c, h.systemService.GetInfo(c.Request.Context()))
|
||||
}
|
||||
Reference in New Issue
Block a user