Ajouter route POST admin documents upload
This commit is contained in:
parent
a1146d182f
commit
fd3eebb68c
2 changed files with 13 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<body>
|
||||
{{ template "header-html" }}
|
||||
<h1>Upload</h1>
|
||||
<p>{{ .Message }}</p>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue