1
0

Let's reorginise endpoints a little.

This commit is contained in:
Alexander Andreev 2023-05-21 20:14:01 +04:00
parent d7191d0fbd
commit cb1dd51750
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -84,9 +84,11 @@ func main() {
srv := http.NewHttpServer() srv := http.NewHttpServer()
srv.SetNotFoundHandler(http.NotFound) srv.SetNotFoundHandler(http.NotFound)
srv.ServeStatic("/assets/*filepath", hand.AssetsFS())
srv.GET("/robots.txt", http.RobotsTxt) srv.GET("/robots.txt", http.RobotsTxt)
srv.GET("/favicon.svg", http.Favicon) srv.GET("/favicon.svg", http.Favicon)
srv.ServeStatic("/assets/*filepath", hand.AssetsFS())
srv.GET("/", hand.Index) srv.GET("/", hand.Index)
srv.POST("/", hand.Upload) srv.POST("/", hand.Upload)
srv.POST("/delete", hand.Delete) srv.POST("/delete", hand.Delete)