fix: Export QuickImportResult interface for proper type usage in QuickImportController

This commit is contained in:
Nils-Johan Gynther
2026-04-12 07:44:02 +02:00
parent 4f183df711
commit 23ced5e8ee
2 changed files with 3 additions and 3 deletions
@@ -1,5 +1,5 @@
import { Controller, Post, Body } from '@nestjs/common'; import { Controller, Post, Body } from '@nestjs/common';
import { QuickImportService } from './quick-import.service'; import { QuickImportService, QuickImportResult } from './quick-import.service';
@Controller('quick-import') @Controller('quick-import')
export class QuickImportController { export class QuickImportController {
@@ -8,7 +8,7 @@ export class QuickImportController {
@Post() @Post()
async importFromInput( async importFromInput(
@Body() body: { input: string } @Body() body: { input: string }
) { ): Promise<QuickImportResult> {
return this.quickImportService.importFromInput(body.input); return this.quickImportService.importFromInput(body.input);
} }
} }
@@ -1,6 +1,6 @@
import { Injectable, BadRequestException } from '@nestjs/common'; import { Injectable, BadRequestException } from '@nestjs/common';
interface QuickImportResult { export interface QuickImportResult {
markdown: string; markdown: string;
source: 'ica' | 'pdf' | 'other'; source: 'ica' | 'pdf' | 'other';
} }