mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-02-16 11:10:53 +00:00
first
This commit is contained in:
39
http/controller/api/index.go
Normal file
39
http/controller/api/index.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"Gwen/http/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Index struct {
|
||||
}
|
||||
|
||||
// Index 首页
|
||||
// @Tags 首页
|
||||
// @Summary 首页
|
||||
// @Description 首页
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} response.Response
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router / [get]
|
||||
func (i *Index) Index(c *gin.Context) {
|
||||
response.Success(
|
||||
c,
|
||||
"Hello Gwen",
|
||||
)
|
||||
}
|
||||
|
||||
// Heartbeat 心跳
|
||||
// @Tags 首页
|
||||
// @Summary 心跳
|
||||
// @Description 心跳
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} nil
|
||||
// @Failure 500 {object} response.Response
|
||||
// @Router /heartbeat [post]
|
||||
func (i *Index) Heartbeat(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{})
|
||||
}
|
||||
Reference in New Issue
Block a user