Просмотр исходного кода

fix(ocr): 修复识别结果为短横线时的错误

wui 10 месяцев назад
Родитель
Сommit
b635d748a1
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Controllers/Http/OcrRecordController.ts

+ 1 - 1
app/Controllers/Http/OcrRecordController.ts

@@ -10,7 +10,7 @@ export default class OcrRecordController {
     public async index({ request }: HttpContextContract) {
         const res = await this.paginationService.paginate(request.all())
         for (let e of res) {
-            if (e.img) {
+            if (e.img && e.img !== '-') {
                 e.img = await Drive.getSignedUrl(new URL(e.img).pathname.replace(/^\//, ''))
             }
         }