You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
672 B
30 lines
672 B
package sys
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"pure/model"
|
|
"pure/model/response"
|
|
"pure/service"
|
|
)
|
|
|
|
// @Summary 获取版本信息
|
|
// @Security Bearer
|
|
// @Description
|
|
// @Tags version
|
|
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|
// @Router /influencer/base/version [get]
|
|
func GetVersion(c *gin.Context) {
|
|
var (
|
|
err error
|
|
result model.VersionV
|
|
)
|
|
platform := c.GetString("platform")
|
|
version := c.GetString("version")
|
|
result, err = service.CheckVersion(platform, version)
|
|
if err != nil {
|
|
response.FailWithMessage(err.Error(), c)
|
|
} else {
|
|
response.OkWithData(result, c)
|
|
}
|
|
}
|
|
|