From cb1dd51750b08fc887216ca4f38e6e2a25bba863 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 21 May 2023 20:14:01 +0400 Subject: [PATCH] Let's reorginise endpoints a little. --- cmd/dwelling-upload/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/dwelling-upload/main.go b/cmd/dwelling-upload/main.go index c5a51fd..47d0207 100644 --- a/cmd/dwelling-upload/main.go +++ b/cmd/dwelling-upload/main.go @@ -84,9 +84,11 @@ func main() { srv := http.NewHttpServer() srv.SetNotFoundHandler(http.NotFound) + + srv.ServeStatic("/assets/*filepath", hand.AssetsFS()) srv.GET("/robots.txt", http.RobotsTxt) srv.GET("/favicon.svg", http.Favicon) - srv.ServeStatic("/assets/*filepath", hand.AssetsFS()) + srv.GET("/", hand.Index) srv.POST("/", hand.Upload) srv.POST("/delete", hand.Delete)