From 0a6961e338208cbd7af0e1c558b5c24ee36cecee Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Fri, 24 Mar 2023 20:02:46 -0400 Subject: [PATCH] Ajouter route /static/general.css --- server.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server.go b/server.go index 6c13483..566d22b 100644 --- a/server.go +++ b/server.go @@ -46,6 +46,8 @@ func Execute() { // Static Routes + e.GET("/static/general.css", handleStaticCSSGeneral) + e.GET("/static/index.css", handleStaticCSSIndex) // HTML Routes @@ -123,3 +125,9 @@ func handleStaticCSSIndex(c echo.Context) error { data, _ := embedFS.ReadFile("css/index.css") return c.Blob(http.StatusOK, "text/css", data) } + +func handleStaticCSSGeneral(c echo.Context) error { + // TODO Ajouter gestion d'erreurs + data, _ := embedFS.ReadFile("css/general.css") + return c.Blob(http.StatusOK, "text/css", data) +}