mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-07 05:02:51 +08:00
26 lines
517 B
Go
26 lines
517 B
Go
//go:build ignore
|
|
|
|
package httpapi
|
|
|
|
import (
|
|
"backupx/server/internal/service"
|
|
"backupx/server/pkg/response"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type systemHandler struct {
|
|
service *service.SystemService
|
|
}
|
|
|
|
func newSystemHandler(service *service.SystemService) *systemHandler {
|
|
return &systemHandler{service: service}
|
|
}
|
|
|
|
func (h *systemHandler) registerRoutes(protected gin.IRouter) {
|
|
protected.GET("/system/info", h.info)
|
|
}
|
|
|
|
func (h *systemHandler) info(c *gin.Context) {
|
|
response.Success(c, h.service.GetInfo())
|
|
}
|