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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user