fastn icon indicating copy to clipboard operation
fastn copied to clipboard

`ftd.redirect` not working with `ftd.http` response data

Open siddhantk232 opened this issue 1 year ago • 0 comments

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
    }
}

siddhantk232 avatar May 08 '24 10:05 siddhantk232