Skip to content

Commit

Permalink
fix: fix openapi get by record id
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Aug 19, 2024
1 parent edbc324 commit 4d92feb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ export async function getReadableRecordById(
const table = (await this.tableRepository.findOne(Some(spec))).expect("Table not found")

const record = (await this.repo.findOneById(table, new RecordIdVO(dto.id), None)).into(undefined)
return record ? Some(recordToReadable(table, record)) : None
if (!record) {
return None
}
const values = await this.populateAttachment(dto, table, record.values)

return Some(recordToReadable(table, { ...record, values }))
}

0 comments on commit 4d92feb

Please sign in to comment.