diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/api/event-api.jag b/modules/distribution/src/repository/jaggeryapps/iotserver/api/event-api.jag index 944722c1..18b6e53f 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/api/event-api.jag +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/api/event-api.jag @@ -48,6 +48,26 @@ if (uriMatcher.match("/{context}/api/event/list")) { } catch (error) { log.error(error); } + + var eventsData = []; + + if (fetchedData == null) return []; + + for (var i = 0; i < fetchedData.size(); i++) { + //eventsData.push({ + // time: fetchedData.get(i).getTime(), + // deviceName: fetchedData.get(i).getDeviceName(), + // activity: fetchedData.get(i).getDeviceActivity() + //}); + + eventsData.push({ + time: 234234, + deviceName: "my device", + activity: "test" + }); + } + + return eventsData; } // returning the result.