fix(gallery): be consistent and disable UI routes as well (#3262)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-08-18 09:26:29 +02:00 committed by GitHub
parent 5d416006ae
commit 1dbb3b8abc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,6 +119,8 @@ func RegisterUIRoutes(app *fiber.App,
})
}
if !appConfig.DisableGalleryEndpoint {
// Show the Models page (all models)
app.Get("/browse", auth, func(c *fiber.Ctx) error {
term := c.Query("term")
@ -298,6 +300,7 @@ func RegisterUIRoutes(app *fiber.App,
return c.SendString(elements.DoneProgress(galleryID, displayText, showDelete))
})
}
// Show the Chat page
app.Get("/chat/:model", auth, func(c *fiber.Ctx) error {