parent
a721a9f3bd
commit
2945a5d744
@ -0,0 +1,31 @@
|
||||
package content
|
||||
|
||||
// controller
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// action
|
||||
func Get(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"id": ctx.Param("id"),
|
||||
"message": "内容查询",
|
||||
})
|
||||
}
|
||||
func Post(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"message": "内容添加",
|
||||
})
|
||||
}
|
||||
func Delete(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"message": "内容删除",
|
||||
})
|
||||
}
|
||||
func Put(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"message": "内容更新",
|
||||
})
|
||||
}
|
Loading…
Reference in new issue