feat(response): 统一结构返回
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user