diff --git a/services/api/src/api/v1/operations/geoloc/sync.post.js b/services/api/src/api/v1/operations/geoloc/sync.post.js index 6e3e1e7..64dafea 100644 --- a/services/api/src/api/v1/operations/geoloc/sync.post.js +++ b/services/api/src/api/v1/operations/geoloc/sync.post.js @@ -13,6 +13,7 @@ module.exports = function () { const logger = ctx.require("logger") const { location } = req.body const { + event, coords: { accuracy, altitude, @@ -29,6 +30,11 @@ module.exports = function () { const { deviceId } = session + // Log the event type if present + if (event) { + logger.debug({ action: "geoloc-sync-event", deviceId, event }) + } + // Check JWT expiration sequence to prevent replay attacks if (session.exp) { const deviceExpKey = `device:${deviceId}:last_exp` diff --git a/services/api/src/api/v1/operations/geoloc/sync.post.spec.yaml b/services/api/src/api/v1/operations/geoloc/sync.post.spec.yaml index 97154a6..ea8c873 100644 --- a/services/api/src/api/v1/operations/geoloc/sync.post.spec.yaml +++ b/services/api/src/api/v1/operations/geoloc/sync.post.spec.yaml @@ -31,7 +31,7 @@ requestBody: - geofence - geofenceschange - enabledchange - - connectvitychange + - connectivitychange - schedule - powersavechange - notificationaction