find many take 1
This commit is contained in:
parent
eea31ea42f
commit
227c9ff296
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue