fix event sending
This commit is contained in:
@ -28,7 +28,8 @@ router.post(
|
||||
async (req: Request, res: Response) => {
|
||||
try {
|
||||
const message = req.body as TtnMessage;
|
||||
const { lp_ttn_end_device_uplinks_id } =
|
||||
// Create uplink record
|
||||
const { lp_ttn_end_device_uplinks_id, latitude, longitude } =
|
||||
await lpTtnEndDeviceUplinksService.createUplink({
|
||||
device_id: message.end_device_ids.device_id,
|
||||
application_ids:
|
||||
@ -78,8 +79,7 @@ router.post(
|
||||
latitude: g.latitude,
|
||||
longitude: g.longitude,
|
||||
})),
|
||||
gnssLocation:
|
||||
|
||||
gnssLocation: { latitude, longitude }
|
||||
};
|
||||
|
||||
domainEventEmitter.emit(TtnMessageReceivedEventName, event);
|
||||
|
Reference in New Issue
Block a user