Add reset, some minor UX tweaks

This commit is contained in:
mudler
2024-04-12 19:34:26 +02:00
parent 03175d36ab
commit 4b41653d00
10 changed files with 194 additions and 63 deletions

View File

@@ -20,6 +20,13 @@ type (
}
)
func (a *App) KnowledgeBaseReset(db *InMemoryDatabase) func(c *fiber.Ctx) error {
return func(c *fiber.Ctx) error {
db.Reset()
return c.Redirect("/knowledgebase")
}
}
func (a *App) KnowledgeBaseFile(db *InMemoryDatabase) func(c *fiber.Ctx) error {
return func(c *fiber.Ctx) error {
// https://golang.withcodeexample.com/blog/file-upload-handling-golang-fiber-guide/