🐛 fix(auth): remove all type-only ConfigService imports

Found and fixed type-only ConfigService imports in 6 service files that were causing "Nest can't resolve dependencies" errors:

- better-auth.service.ts (BetterAuthService)
- ai.service.ts (AiService)
- settings.service.ts
- feedback.service.ts
- credits.service.ts
- jwt-auth.guard.ts
- optional-auth.guard.ts

Type-only imports are erased at compile time, preventing NestJS from injecting the ConfigService class at runtime.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Wuesteon 2025-12-04 21:53:28 +01:00
parent a865da99a8
commit 60ecc24f6c
6 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ import {
ForbiddenException,
UnauthorizedException,
} from '@nestjs/common';
import { type ConfigService } from '@nestjs/config';
import { ConfigService } from '@nestjs/config';
import { createBetterAuth, type BetterAuthInstance } from '../better-auth.config';
import { getDb } from '../../db/connection';
import { balances, organizationBalances } from '../../db/schema/credits.schema';

View file

@ -4,7 +4,7 @@ import {
type ExecutionContext,
UnauthorizedException,
} from '@nestjs/common';
import { type ConfigService } from '@nestjs/config';
import { ConfigService } from '@nestjs/config';
import * as jwt from 'jsonwebtoken';
@Injectable()

View file

@ -1,5 +1,5 @@
import { Injectable, type CanActivate, type ExecutionContext } from '@nestjs/common';
import { type ConfigService } from '@nestjs/config';
import { ConfigService } from '@nestjs/config';
import * as jwt from 'jsonwebtoken';
/**

View file

@ -5,7 +5,7 @@ import {
ConflictException,
ForbiddenException,
} from '@nestjs/common';
import { type ConfigService } from '@nestjs/config';
import { ConfigService } from '@nestjs/config';
import { eq, and, sql, desc, sum } from 'drizzle-orm';
import { getDb } from '../db/connection';
import {

View file

@ -1,5 +1,5 @@
import { Injectable, NotFoundException, ConflictException, Logger } from '@nestjs/common';
import { type ConfigService } from '@nestjs/config';
import { ConfigService } from '@nestjs/config';
import { eq, and, desc, sql, count } from 'drizzle-orm';
import { getDb } from '../db/connection';
import { userFeedback, feedbackVotes } from '../db/schema';

View file

@ -1,5 +1,5 @@
import { Injectable, Logger } from '@nestjs/common';
import { type ConfigService } from '@nestjs/config';
import { ConfigService } from '@nestjs/config';
import { eq } from 'drizzle-orm';
import { getDb } from '../db/connection';
import { userSettings } from '../db/schema';