bin/handlers_partial.go

18 lines
394 B
Go
Raw Normal View History

2023-09-10 23:40:19 +02:00
package main
import (
"net/http"
"github.com/labstack/echo/v4"
)
func getPartialUploadHandler(c echo.Context) error {
c.Response().Header().Add("HX-Push", "/new")
return RenderComponent(c, http.StatusOK, newFileUpload())
}
func getPartialTextHandler(c echo.Context) error {
c.Response().Header().Add("HX-Push", "/new?text")
return RenderComponent(c, http.StatusOK, newTextSubmit())
}