Fix jwt-token
This commit is contained in:
@@ -55,7 +55,10 @@ const detectorSchema = Joi.alternatives().try(
|
||||
type: Joi.string().valid('heartbeat').required(),
|
||||
key: Joi.string().required(),
|
||||
// Optional heartbeat fields
|
||||
device_id: Joi.number().integer().optional(),
|
||||
device_id: Joi.alternatives().try(
|
||||
Joi.number().integer(),
|
||||
Joi.string()
|
||||
).optional(),
|
||||
geo_lat: Joi.number().min(-90).max(90).optional(),
|
||||
geo_lon: Joi.number().min(-180).max(180).optional(),
|
||||
location_description: Joi.string().optional(),
|
||||
@@ -65,7 +68,10 @@ const detectorSchema = Joi.alternatives().try(
|
||||
}),
|
||||
// Detection schema
|
||||
Joi.object({
|
||||
device_id: Joi.number().integer().required(),
|
||||
device_id: Joi.alternatives().try(
|
||||
Joi.number().integer(),
|
||||
Joi.string()
|
||||
).required(),
|
||||
geo_lat: Joi.number().min(-90).max(90).required(),
|
||||
geo_lon: Joi.number().min(-180).max(180).required(),
|
||||
device_timestamp: Joi.number().integer().min(0).required(),
|
||||
|
||||
Reference in New Issue
Block a user