find many take 1

This commit is contained in:
boufni95 2024-08-29 22:48:44 +02:00
parent eea31ea42f
commit 227c9ff296

View file

@ -53,9 +53,9 @@ export default class {
} }
async GetLatestForwardingIndexOffset() { async GetLatestForwardingIndexOffset() {
const latestIndex = await this.DB.getRepository(ChannelRouting).findOne({ order: { latest_index_offset: "DESC" } }) const latestIndex = await this.DB.getRepository(ChannelRouting).find({ order: { latest_index_offset: "DESC" }, take: 1 })
if (latestIndex) { if (latestIndex.length > 0) {
return latestIndex.latest_index_offset return latestIndex[0].latest_index_offset
} }
return 0 return 0
} }