code refactoring, added file download (#118)

This commit is contained in:
Marco
2023-12-27 15:08:51 +01:00
committed by GitHub
parent c5535fad71
commit 3859c80214
5 changed files with 82 additions and 39 deletions

View File

@@ -102,7 +102,8 @@ func newServer(c serverConfig) *http.Server {
}
r.Post("/downloaded", handlers.ListDownloaded)
r.Post("/delete", handlers.DeleteFile)
r.Get("/d/{id}", handlers.SendFile)
r.Get("/d/{id}", handlers.DownloadFile)
r.Get("/v/{id}", handlers.SendFile)
})
// Authentication routes