feat: allow to view chat message in manager console

This commit is contained in:
RockYang
2024-02-22 17:16:44 +08:00
parent 9988dff885
commit e02a8d7586
23 changed files with 688 additions and 26 deletions

View File

@@ -136,6 +136,7 @@ func main() {
fx.Provide(admin.NewChatModelHandler),
fx.Provide(admin.NewProductHandler),
fx.Provide(admin.NewOrderHandler),
fx.Provide(admin.NewChatHandler),
// 创建服务
fx.Provide(sms.NewSendServiceManager),
@@ -372,7 +373,14 @@ func main() {
group.POST("zaobao", h.ZaoBao)
group.POST("dalle3", h.Dall3)
}),
fx.Invoke(func(s *core.AppServer, h *admin.ChatHandler) {
group := s.Engine.Group("/api/admin/chat/")
group.POST("list", h.List)
group.POST("message", h.Messages)
group.GET("history", h.History)
group.GET("remove", h.RemoveChat)
group.GET("message/remove", h.RemoveMessage)
}),
fx.Provide(handler.NewTestHandler),
fx.Invoke(func(s *core.AppServer, h *handler.TestHandler) {
s.Engine.GET("/api/test", h.Test)