mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
fix: EventRepository.create returning undefined
This commit is contained in:
parent
b5987915b1
commit
33b5f90d4c
@ -83,17 +83,12 @@ export class EventRepository implements IEventRepository {
|
||||
event_signature: pipe(prop('sig'), toBuffer),
|
||||
})(event)
|
||||
|
||||
return void this.dbClient('events')
|
||||
return this.dbClient('events')
|
||||
.insert(row)
|
||||
.onConflict('event_id')
|
||||
.ignore()
|
||||
.then(
|
||||
(result) => {
|
||||
return (result as any).rowCount
|
||||
},
|
||||
(error) => {
|
||||
console.error('mistakes were made', error)
|
||||
},
|
||||
(({ rowCount }: { rowCount: number }) => rowCount) as any,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user