mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-01 15:46:38 +08:00
18 lines
284 B
Go
18 lines
284 B
Go
package controller
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/gin-gonic/gin"
|
|
"net/http"
|
|
"one-api/common"
|
|
)
|
|
|
|
func Health(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"success": true,
|
|
"message": fmt.Sprintf("One-api is healthy. Version: %s", common.Version),
|
|
"data": "",
|
|
})
|
|
return
|
|
}
|