Refactor middleware and routes to use onRequest for API key and admin key guards; update dependencies and improve logging for error handling

This commit is contained in:
Flavio Fois
2026-03-02 19:30:59 +01:00
parent 5761cbaa55
commit 3f15edae75
8 changed files with 72 additions and 58 deletions

View File

@@ -8,7 +8,7 @@ const excludedHwids = new Set<string>([
"95e025d1-7567-462e-9354-ac88b965cd22",
]);
export const hwidRateLimit = new Elysia({ name: "hwid-rate-limit" }).derive(
export const hwidRateLimit = new Elysia({ name: "hwid-rate-limit" }).onBeforeHandle(
{ as: "scoped" },
// @ts-ignore
async ({ body, error }) => {