Marvin Hagemeister
e3508c3054
feat: add ctx.redirect() helper ( #2358 )
...
This PR adds a `ctx.redirect(path, status)` helper that aims to reduce
the verbosity of having to manually create a `Response` obejct for a
mere redirect.
```ts
// Before
new Response(null, {
status: 307,
headers: {
Location: "/foo/bar"
},
})
// After
ctx.redirect("/foo/bar", 307)
```
If the second parameter is not passed, it will default to `302`.
2024-03-12 17:36:34 +01:00
..
2024-03-12 17:36:34 +01:00
2023-12-02 10:33:59 +01:00
2024-03-12 17:36:34 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2023-11-30 17:07:00 +01:00
2023-11-30 17:07:00 +01:00
2023-11-30 17:07:00 +01:00
2023-11-30 17:07:00 +01:00
2024-02-22 10:46:41 +01:00
2023-12-02 10:33:59 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2023-12-02 10:33:59 +01:00
2023-12-02 10:33:59 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-03-12 12:04:42 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2023-11-30 17:07:00 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-02-22 10:46:41 +01:00
2024-01-04 11:53:15 +01:00
2023-09-06 13:11:48 +02:00
2024-02-19 10:33:04 +01:00
2024-02-23 13:30:42 +01:00
2023-11-28 16:43:50 +00:00
2024-01-10 10:25:07 +01:00
2024-02-23 13:30:42 +01:00
2023-12-04 12:06:06 +01:00
2023-10-05 21:39:42 +02:00
2023-12-04 11:14:11 +00:00
2023-11-28 16:43:50 +00:00
2023-11-03 16:52:54 +01:00
2024-01-30 12:34:38 +01:00
2024-01-10 00:33:38 +01:00
2023-10-02 20:50:03 +02:00
2023-10-04 14:10:11 +02:00
2024-03-12 17:36:34 +01:00
2024-01-23 21:51:38 +01:00
2023-12-04 16:56:00 +01:00
2024-03-12 12:04:42 +01:00
2023-11-28 16:43:50 +00:00
2023-11-03 16:52:54 +01:00
2024-03-12 17:36:34 +01:00
2023-09-18 11:09:24 +02:00
2023-12-07 12:23:23 +01:00
2024-01-10 10:35:26 +01:00
2024-01-23 21:51:38 +01:00
2023-11-28 16:35:26 +00:00
2023-11-06 14:04:43 +01:00
2023-11-28 16:43:50 +00:00