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
..
2023-11-30 14:08:05 +01:00
2023-12-02 10:33:59 +01:00
2023-08-16 16:30:16 +02:00
2023-05-25 08:55:09 +10:00
2022-08-26 11:03:00 +02:00
2022-08-26 11:03:00 +02:00
2023-09-18 16:25:37 +02:00
2023-09-07 14:28:44 +02:00
2023-07-03 09:59:38 +02:00
2023-12-02 10:33:59 +01:00
2023-12-02 10:33:59 +01:00
2023-07-25 11:17:40 +02:00
2023-09-05 01:00:33 +02:00
2022-08-26 11:03:00 +02:00
2023-12-02 10:33:59 +01:00
2023-08-07 20:33:08 +02:00
2023-12-02 10:33:59 +01:00
2023-12-02 10:33:59 +01:00
2023-09-11 16:05:55 +02:00
2023-12-02 10:33:59 +01:00
2023-12-02 10:33:59 +01:00
2023-12-02 10:33:59 +01:00
2023-11-30 14:08:05 +01:00
2022-08-26 11:03:00 +02:00
2023-10-30 18:00:57 +01:00
2023-07-03 09:57:46 +02:00
2024-02-19 10:33:04 +01:00
2024-02-19 10:33:04 +01:00
2023-07-10 13:02:45 +02:00
2023-07-25 15:32:58 +02:00
2023-07-26 13:09:42 +00:00
2022-09-12 17:33:02 +02:00
2022-03-06 18:25:50 +01:00
2023-11-27 11:20:40 +01:00
2023-11-30 18:14:59 +01:00
2023-09-18 22:06:56 +02:00
2022-08-26 11:03:00 +02:00
2023-07-03 09:57:46 +02:00
2023-12-02 10:33:59 +01:00
2024-01-10 00:33:38 +01:00
2023-07-03 09:57:46 +02:00
2023-09-14 09:39:53 +02:00
2023-09-11 16:05:55 +02:00
2023-07-03 09:57:46 +02:00
2023-12-02 10:33:59 +01:00
2024-03-12 17:36:34 +01:00
2023-07-24 09:37:05 +00:00
2024-01-15 19:41:12 +01:00
2022-08-26 11:03:00 +02:00
2023-12-02 10:33:59 +01:00
2023-12-06 09:33:36 +01:00
2023-07-10 14:13:01 +02:00
2022-08-26 11:03:00 +02:00