| 123456789101112131415161718192021222324252627282930 | package pddimport (	"duoduo/models/pdd"	"duoduo/tools/app"	"github.com/gin-gonic/gin")func Set(c *gin.Context) {	var inData pdd.SetRequest	var outData pdd.SetResponse	err := c.ShouldBindJSON(&inData)	if err != nil {		app.Error(c, 400, err, err.Error())		return	}	if inData.Version == "1.0.4" {		outData.Type = "true"		app.OK(c, outData, app.Success)	} else if inData.Version == "2.1.1"{		outData.Type = "true"		app.OK(c, outData, app.Success)	} else {		outData.Type = "false"		app.OK(c, outData, app.Success)	}}
 |