fastn
fastn copied to clipboard
`ftd.redirect` not working with `ftd.http` response data
to reproduce:
-- boolean $success: false
-- ftd.redirect: /
if: { success }
-- ftd.text: click me to get response
$on-click$: call-http()
-- void call-http(opts):
ftd.http-options opts: $opts
ftd.http("http://127.0.0.1:3000/test.json", opts)
-- ftd.http-options opts:
redirect: follow
method: POST
fastn-module: www.fifthtry.com/signin
clicking on the rendered text should throw: TypeError: ftd.redirect is not a function (see the browser console)
the response from http://127.0.0.1:3000/test.json is:
{
"data": {
"success": true
}
}