Refactor PDF handling and update config

Simplified the return logic in `SwissQrCodeController` by removing conditional checks and directly returning the result.

Refactored `DevExpressPdfProcessor` to handle encrypted PDFs more effectively by checking for encryption before attempting to load with DevExpress, thus avoiding potential errors. Metadata extraction is now limited to non-encrypted PDFs.

Added `opencode.jsonc` configuration file to define schema and specify paths for integrating external AI skills with the OpenCode AI platform.
This commit is contained in:
2026-10-22 01:43:19 +02:00
parent 0db28a025f
commit de5e2d613f
3 changed files with 45 additions and 22 deletions

View File

@@ -55,7 +55,7 @@ public class SwissQrCodeController(IMediator Mediator) : ControllerBase
};
var result = await Mediator.Send(query, cancellationToken);
return Ok(raw ? result.RawLines : result.Bill);
return Ok(result);
}
/// <summary>
@@ -97,7 +97,7 @@ public class SwissQrCodeController(IMediator Mediator) : ControllerBase
var query = new ExtractSwissQrCodeQuery { PdfStream = pdfStream };
var result = await Mediator.Send(query, cancellationToken);
return Ok(raw ? result.RawLines : result.Bill);
return Ok(result);
}
}