This commit is contained in:
mike12345567 2021-06-21 18:40:36 +01:00
parent f4757aeee1
commit c87b960ebf
1 changed files with 8 additions and 4 deletions

View File

@ -11,10 +11,14 @@ async function redirect(ctx, method) {
const { devPath } = ctx.params
const response = await fetch(
checkSlashesInUrl(`${env.WORKER_URL}/api/admin/${devPath}`),
request(ctx, {
request(
ctx,
{
method,
body: ctx.request.body,
}, true)
},
true
)
)
if (response.status !== 200) {
ctx.throw(response.status, response.statusText)