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.
 
 
 
 
 
 

33 lines
857 B

package user
import (
"yunyan/comm"
"yunyan/pb"
)
// @Summary 获取唤醒词列表
// @Description 获取唤醒词列表
// @Tags User
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param user body pb.UserGetWakeupVoicesReq true "用户反馈"
// @Success 200 {object} comm.HttpResult{data=pb.UserGetWakeupVoicesResp} "成功返回"
// @Router /api/home/user_getwakeupvoices [post]
func (this *apiComp) GetWakeupVoices(session comm.IUserSession, req *pb.UserGetWakeupVoicesReq) (resp *pb.UserGetWakeupVoicesResp, errdata *pb.ErrorData) {
var (
voices []*pb.DBWakeupVoice
err error
)
if voices, err = this.module.configmodel.getWakeupVoices(); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
resp = &pb.UserGetWakeupVoicesResp{
Voices: voices,
}
return
}