refactor(chat): 欢迎语仅保留账号群配置
This commit is contained in:
@@ -78,26 +78,6 @@ func (h *Handler) AdminDeleteQuickReply(c *gin.Context) {
|
||||
response.OK(c, gin.H{"deleted": true})
|
||||
}
|
||||
|
||||
func (h *Handler) AdminGetAutoWelcome(c *gin.Context) {
|
||||
message := h.service.GetAutoWelcomeMessage(c.Request.Context())
|
||||
response.OK(c, gin.H{"message": message})
|
||||
}
|
||||
|
||||
func (h *Handler) AdminUpdateAutoWelcome(c *gin.Context) {
|
||||
var req struct {
|
||||
Message string `json:"message" binding:"required"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
response.BadRequest(c, "话术内容不能为空")
|
||||
return
|
||||
}
|
||||
if err := h.service.UpdateAutoWelcomeMessage(c.Request.Context(), req.Message); err != nil {
|
||||
writeChatError(c, err)
|
||||
return
|
||||
}
|
||||
response.OK(c, gin.H{"updated": true})
|
||||
}
|
||||
|
||||
func (h *Handler) AdminGetListingGroupWelcome(c *gin.Context) {
|
||||
message := h.service.GetListingGroupWelcomeMessage(c.Request.Context())
|
||||
response.OK(c, gin.H{"message": message})
|
||||
|
||||
Reference in New Issue
Block a user