21 lines
683 B
Go
21 lines
683 B
Go
|
package routers
|
||
|
|
||
|
import (
|
||
|
"github.com/gin-gonic/gin"
|
||
|
"wechathook/models"
|
||
|
)
|
||
|
|
||
|
func WechatAIStatus(c *gin.Context) {
|
||
|
groupAIStatus := c.PostForm("groupAIStatus")
|
||
|
models.AddSetting("群聊AI开关", "groupAIStatus", groupAIStatus)
|
||
|
personAIStatus := c.PostForm("personAIStatus")
|
||
|
models.AddSetting("私聊AI开关", "personAIStatus", personAIStatus)
|
||
|
groupKeywordStatus := c.PostForm("groupKeywordStatus")
|
||
|
models.AddSetting("群聊关键词开关", "groupKeywordStatus", groupKeywordStatus)
|
||
|
personKeywordStatus := c.PostForm("personKeywordStatus")
|
||
|
models.AddSetting("私聊关键词开关", "personKeywordStatus", personKeywordStatus)
|
||
|
c.JSON(200, gin.H{
|
||
|
"message": "ok",
|
||
|
})
|
||
|
}
|