mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 03:03:43 +08:00
refactor: refactor chat model, replace mode value with mode id. refactored system config module, add seperate configration for every chat model
This commit is contained in:
@@ -25,7 +25,7 @@ func NewChatRoleHandler(app *core.AppServer, db *gorm.DB) *ChatRoleHandler {
|
||||
// List get user list
|
||||
func (h *ChatRoleHandler) List(c *gin.Context) {
|
||||
var roles []model.ChatRole
|
||||
res := h.db.Where("enable", true).Order("sort ASC").Find(&roles)
|
||||
res := h.db.Where("enable", true).Order("sort_num ASC").Find(&roles)
|
||||
if res.Error != nil {
|
||||
resp.ERROR(c, "No roles found,"+res.Error.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user