feat(cli): move user and guild registration from API to local CLI

This commit is contained in:
nav
2026-05-14 14:43:59 +00:00
parent 7afd220b4a
commit 0b32dc8e3c
7 changed files with 123 additions and 95 deletions

View File

@@ -33,11 +33,6 @@ export class CenterApiKeyGuard implements CanActivate {
return true;
}
// only guild registration is exempt from API key; it is protected by HMAC secret
if (method === 'POST' && (path === '/nodes/register' || path.endsWith('/nodes/register'))) {
return true;
}
const received = req.headers['x-api-key'];
const apiKey = Array.isArray(received) ? received[0] : received;
if (!apiKey) throw new UnauthorizedException('missing api key');