Appearance
ctx.redirect
Redirects the page to another action. page, or external URL in the current browser window.
ts
# internal
await ctx.redirect({ route: "create_order", params: { id: order.id } })
# external
await ctx.redirect({ url: "https://forgeapp.io" })
python
# the python SDK requires you to import ctx differently for pages vs actions
from forgeapp_sdk import ctx_var, action_ctx_var
# ctx = action_ctx_var.get() for actions
ctx = ctx_var.get()
# internal
await ctx.redirect(route = "create_order", params = { "id"": order.id } })
# external
await ctx.redirect(url = "https://forgeapp.io")