diff --git a/cmd/server.go b/cmd/server.go index 906cc2d..9889faf 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -201,6 +201,8 @@ func RunServer() { groupAdmin.GET("/documents/upload", handleAdminDocumentsUpload) + groupAdmin.POST("/documents/upload", handleAdminDocumentsUploadPOST) + e.Logger.Fatal(e.Start( fmt.Sprintf(":%d", viper.GetInt("server.port")))) } @@ -726,6 +728,16 @@ func handleAdminDocumentsUpload(c echo.Context) error { return c.Render(http.StatusOK, "admin-upload-html", nil) } +func handleAdminDocumentsUploadPOST(c echo.Context) error { + data := struct { + Message string + }{ + Message: "Pas implémenté", + } + + return c.Render(http.StatusOK, "admin-upload-html", data) +} + // CSS Handlers func handleStaticCSSIndex(c echo.Context) error { diff --git a/public/html/admin-upload.gohtml b/public/html/admin-upload.gohtml index e39f3b3..7b80e9b 100644 --- a/public/html/admin-upload.gohtml +++ b/public/html/admin-upload.gohtml @@ -9,6 +9,7 @@ {{ template "header-html" }}

Upload

+

{{ .Message }}

{{ end }}