code refactoring, added router, moved download api path

This commit is contained in:
2024-02-23 10:55:33 +01:00
parent 65b0c8bc0e
commit 1cfda047cb
20 changed files with 146 additions and 41 deletions

View File

@@ -30,6 +30,8 @@ func ApplyRouter(db *sql.DB, mdb *internal.MemoryDB, mq *internal.MessageQueue)
r.Post("/template", h.AddTemplate())
r.Get("/template/all", h.GetTemplates())
r.Delete("/template/{id}", h.DeleteTemplate())
r.Get("/tree", h.DirectoryTree())
r.Get("/d/{id}", h.DownloadFile())
}
}