mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
🐛 fix(mana-core-auth): remove type-only imports from services and controllers
Fixed remaining NestJS dependency injection issues by converting type-only imports to regular imports for all injectable services used in controllers and service dependencies.
Changes:
- feedback.service.ts: Fixed AiService import (was causing "argument Function at index [1]" error)
- auth.controller.ts: Fixed BetterAuthService import
- feedback.controller.ts: Fixed FeedbackService import
- credits.controller.ts: Fixed CreditsService import
- settings.controller.ts: Fixed SettingsService import
Root cause: Type-only imports (`import { type X }`) are erased at compile time, causing NestJS to fail dependency injection at runtime. All injectable classes must use regular imports.
Verified locally: All modules initialize successfully without DI errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
60ecc24f6c
commit
9b26caf5a1
5 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
HttpCode,
|
||||
HttpStatus,
|
||||
} from '@nestjs/common';
|
||||
import { type BetterAuthService } from './services/better-auth.service';
|
||||
import { BetterAuthService } from './services/better-auth.service';
|
||||
import { type RegisterDto } from './dto/register.dto';
|
||||
import { type LoginDto } from './dto/login.dto';
|
||||
import { type RefreshTokenDto } from './dto/refresh-token.dto';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Controller, Get, Post, Body, UseGuards, Query, ParseIntPipe, Param } from '@nestjs/common';
|
||||
import { type CreditsService } from './credits.service';
|
||||
import { CreditsService } from './credits.service';
|
||||
import { JwtAuthGuard } from '../common/guards/jwt-auth.guard';
|
||||
import { CurrentUser, type CurrentUserData } from '../common/decorators/current-user.decorator';
|
||||
import { type UseCreditsDto } from './dto/use-credits.dto';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
UseGuards,
|
||||
Headers,
|
||||
} from '@nestjs/common';
|
||||
import { type FeedbackService } from './feedback.service';
|
||||
import { FeedbackService } from './feedback.service';
|
||||
import { JwtAuthGuard } from '../common/guards/jwt-auth.guard';
|
||||
import { OptionalAuthGuard } from '../common/guards/optional-auth.guard';
|
||||
import { CurrentUser, type CurrentUserData } from '../common/decorators/current-user.decorator';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { eq, and, desc, sql, count } from 'drizzle-orm';
|
|||
import { getDb } from '../db/connection';
|
||||
import { userFeedback, feedbackVotes } from '../db/schema';
|
||||
import { type CreateFeedbackDto, type FeedbackQueryDto } from './dto';
|
||||
import { type AiService } from '../ai/ai.service';
|
||||
import { AiService } from '../ai/ai.service';
|
||||
|
||||
@Injectable()
|
||||
export class FeedbackService {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Controller, Get, Patch, Delete, Body, Param, UseGuards } from '@nestjs/common';
|
||||
import { type SettingsService } from './settings.service';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { JwtAuthGuard } from '../common/guards/jwt-auth.guard';
|
||||
import { CurrentUser, type CurrentUserData } from '../common/decorators/current-user.decorator';
|
||||
import { type UpdateGlobalSettingsDto, type UpdateAppOverrideDto } from './dto';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue