Skip to content

Commit 13da0a2

Browse files
committed
Use the returned output
1 parent 8074a6f commit 13da0a2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/plugin.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ export default class ArtimiPlugin {
4545
transcription.config.jobId = job.id
4646

4747
logger.info(`Fetch transcription ${job.id}...`)
48-
await this.poll(job)
48+
let { output } = await this.poll(job)
4949

50-
transcription.text = job.output.text
51-
transcription.data = job.output.alto
50+
transcription.text = output.text
51+
transcription.data = output.alto
5252
}
5353

5454
async poll (job) {
@@ -127,7 +127,9 @@ export default class ArtimiPlugin {
127127
return `${checksum}.${type}`
128128
case 202:
129129
case 307:
130-
logger.info('Upload image to cache...')
130+
logger.info({
131+
location: res.headers.get('location')
132+
}, 'Upload image to cache...')
131133
res = await fetch(res.headers.get('location'), {
132134
method: 'PUT',
133135
body: image,

0 commit comments

Comments
 (0)