misc: addressed comments

This commit is contained in:
Sheen Capadngan
2025-09-19 01:58:33 +08:00
parent 88176daf47
commit 1ff205916e
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -4,7 +4,7 @@ import { RelaysSchema } from "@app/db/schemas";
import { getConfig } from "@app/lib/config/env";
import { crypto } from "@app/lib/crypto/cryptography";
import { UnauthorizedError } from "@app/lib/errors";
import { writeLimit } from "@app/server/config/rateLimiter";
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
import { slugSchema } from "@app/server/lib/schemas";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -107,6 +107,9 @@ export const registerRelayRouter = async (server: FastifyZodProvider) => {
200: RelaysSchema.array()
}
},
config: {
rateLimit: readLimit
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
return server.services.relay.getRelays({