Changeset 0.6.0 (#36)
This commit is contained in:
@@ -53,7 +53,7 @@ func TestCORSHeaders(t *testing.T) {
|
||||
func TestAllRoutesRegistered(t *testing.T) {
|
||||
cfg := &config.Config{JWTSecret: "test"}
|
||||
auth := handlers.NewAuthHandler(cfg)
|
||||
chats := handlers.NewChatHandler()
|
||||
channels := handlers.NewChannelHandler()
|
||||
msgs := handlers.NewMessageHandler()
|
||||
comp := handlers.NewCompletionHandler()
|
||||
apiCfg := handlers.NewAPIConfigHandler()
|
||||
@@ -73,19 +73,19 @@ func TestAllRoutesRegistered(t *testing.T) {
|
||||
|
||||
protected := api.Group("")
|
||||
{
|
||||
// Chats
|
||||
protected.GET("/chats", chats.ListChats)
|
||||
protected.POST("/chats", chats.CreateChat)
|
||||
protected.GET("/chats/:id", chats.GetChat)
|
||||
protected.PUT("/chats/:id", chats.UpdateChat)
|
||||
protected.DELETE("/chats/:id", chats.DeleteChat)
|
||||
// Channels
|
||||
protected.GET("/channels", channels.ListChannels)
|
||||
protected.POST("/channels", channels.CreateChannel)
|
||||
protected.GET("/channels/:id", channels.GetChannel)
|
||||
protected.PUT("/channels/:id", channels.UpdateChannel)
|
||||
protected.DELETE("/channels/:id", channels.DeleteChannel)
|
||||
|
||||
// Messages
|
||||
protected.GET("/chats/:id/messages", msgs.ListMessages)
|
||||
protected.POST("/chats/:id/messages", msgs.CreateMessage)
|
||||
protected.POST("/chats/:id/regenerate", msgs.Regenerate)
|
||||
protected.GET("/channels/:id/messages", msgs.ListMessages)
|
||||
protected.POST("/channels/:id/messages", msgs.CreateMessage)
|
||||
protected.POST("/channels/:id/regenerate", msgs.Regenerate)
|
||||
|
||||
// Chat Engine
|
||||
// Completion Engine
|
||||
protected.POST("/chat/completions", comp.Complete)
|
||||
|
||||
// API Configs
|
||||
@@ -140,17 +140,17 @@ func TestAllRoutesRegistered(t *testing.T) {
|
||||
"POST /api/v1/auth/login",
|
||||
"POST /api/v1/auth/refresh",
|
||||
"POST /api/v1/auth/logout",
|
||||
// Chats
|
||||
"GET /api/v1/chats",
|
||||
"POST /api/v1/chats",
|
||||
"GET /api/v1/chats/:id",
|
||||
"PUT /api/v1/chats/:id",
|
||||
"DELETE /api/v1/chats/:id",
|
||||
// Channels
|
||||
"GET /api/v1/channels",
|
||||
"POST /api/v1/channels",
|
||||
"GET /api/v1/channels/:id",
|
||||
"PUT /api/v1/channels/:id",
|
||||
"DELETE /api/v1/channels/:id",
|
||||
// Messages
|
||||
"GET /api/v1/chats/:id/messages",
|
||||
"POST /api/v1/chats/:id/messages",
|
||||
"POST /api/v1/chats/:id/regenerate",
|
||||
// Chat Engine
|
||||
"GET /api/v1/channels/:id/messages",
|
||||
"POST /api/v1/channels/:id/messages",
|
||||
"POST /api/v1/channels/:id/regenerate",
|
||||
// Completion Engine
|
||||
"POST /api/v1/chat/completions",
|
||||
// API Configs
|
||||
"GET /api/v1/api-configs",
|
||||
|
||||
Reference in New Issue
Block a user