Skip to content

Commit

Permalink
feat: 根路径增加HEAD方法 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdutwsl authored Aug 23, 2024
1 parent ae22cee commit 0bab012
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import (
)

func Group(r *gin.Engine) {

r.HEAD("/", func(ctx *gin.Context) {
ctx.JSON(http.StatusOK, gin.H{
"code": 0,
"message": "成功",
"data": "",
})
})

r.GET("/", func(ctx *gin.Context) {
ctx.JSON(http.StatusOK, gin.H{
"code": 0,
Expand Down

0 comments on commit 0bab012

Please sign in to comment.