feat(response): 统一结构返回

This commit is contained in:
2024-08-26 11:19:18 +08:00
parent 85c90ec1e1
commit 74c955a3f7
4 changed files with 92 additions and 40 deletions

View File

@ -2,10 +2,9 @@ package handler
import (
"github.com/gin-gonic/gin"
"onvif-agent/response"
)
func Hello(c *gin.Context) {
c.JSON(200, gin.H{
"message": "Hello, World!",
})
response.NewResponse().Success("Hello, World!").Send(c)
}