add login multi api & redirect

This commit is contained in:
2024-06-12 09:22:42 +07:00
parent dd980b4430
commit 9f822c5514
11 changed files with 197 additions and 40 deletions

View File

@@ -32,3 +32,9 @@ func View(c echo.Context, cmp templ.Component) error {
return cmp.Render(c.Request().Context(), c.Response().Writer)
}
func Redirect(c echo.Context, url string) error {
c.Response().Header().Set("HX-Redirect", url)
return c.String(http.StatusOK, url)
}