chore: remove comments

This commit is contained in:
2026-01-30 17:10:06 +01:00
committed by Izan Gil
parent 1e27c7e77a
commit 17bbba7df3

View File

@@ -43,17 +43,13 @@ app.get(
let chatUser: ChatUser | null = null;
let personalChannel: any = null;
// Check for bot authentication via Authorization header or botAuth query parameter
// Authorization header takes precedence if both are provided
let apiKey: string | null = null;
if (authHeader && authHeader.startsWith('Bearer ')) {
const extractedKey = authHeader.substring(7);
// Validate the API key format before attempting database lookup
if (extractedKey.startsWith('hctvb_')) {
apiKey = extractedKey;
}
} else if (botAuth && typeof botAuth === 'string' && botAuth.trim().length > 0) {
// Validate botAuth query parameter format
if (botAuth.startsWith('hctvb_')) {
apiKey = botAuth;
}