Skip to content

Commit d4c3aae

Browse files
authored
use env to Env
1 parent 2e6dd4a commit d4c3aae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ export default {
107107
return new JSONResponse(response.BAD_SIGNATURE, { status: 401 });
108108
}
109109
}
110-
return router.handle(request, loadEnv(env, true), ctx);
110+
const Env: env = loadEnv(env, true);
111+
return router.handle(request, Env, ctx);
111112
},
112113

113114
async scheduled(req: Request, env: env, ctx: ExecutionContext) {
114-
ctx.waitUntil(send(loadEnv(env, true)));
115+
const Env: env = loadEnv(env, true);
116+
ctx.waitUntil(send(Env));
115117
},
116118
};

0 commit comments

Comments
 (0)