Files
aichat/server/routes.go
T
2026-06-17 11:29:51 +08:00

15 lines
620 B
Go

package server
func (s *Server) registerRoutes() {
s.router.GET("/", s.indexHandler)
s.router.POST("/api/chat", s.chatHandler)
s.router.GET("/api/openai", s.listOpenAIHandler)
s.router.POST("/api/openai/active", s.switchOpenAIHandler)
s.router.GET("/api/search", s.listSearchHandler)
s.router.POST("/api/search/active", s.switchSearchHandler)
s.router.GET("/api/conversations", s.listConversationsHandler)
s.router.POST("/api/conversations", s.createConversationHandler)
s.router.GET("/api/conversations/:id", s.getConversationHandler)
s.router.DELETE("/api/conversations/:id", s.deleteConversationHandler)
}