module HAppS.Helpers.Redirect where import HAppS.Server import qualified Data.ByteString.Char8 as B import Text.StringTemplate.Helpers import qualified Data.Map as M import Data.String.Utils (split) import HAppS.Helpers.ParseRequest {- | redirectPath p rq = redirectToUrl $ getAppUrl p rq -} redirectPath :: String -> Request -> WebT IO Response redirectPath p rq = redirectToUrl $ getAppUrl p rq {- | Escape a servrPartT handler by redirecting somewhere Basically a wrapper around supplied seeOther function, which doesn't quite do what I want -} redirectToUrl :: String -> WebT IO Response redirectToUrl url = seeOther url $ toResponse ()