Fix jwt-token
This commit is contained in:
@@ -641,13 +641,17 @@ const DeviceModal = ({ device, onClose, onSave }) => {
|
||||
Device ID *
|
||||
</label>
|
||||
<input
|
||||
type="number"
|
||||
type="text"
|
||||
name="id"
|
||||
required
|
||||
placeholder="e.g. device-001 or sensor-alpha-123"
|
||||
className="w-full border border-gray-300 rounded-md px-3 py-2 focus:ring-primary-500 focus:border-primary-500"
|
||||
value={formData.id}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<p className="text-xs text-gray-500 mt-1">
|
||||
Enter a unique identifier for the device (letters, numbers, dashes allowed)
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const multiAuth = new MultiTenantAuth();
|
||||
|
||||
// Validation schema for device
|
||||
const deviceSchema = Joi.object({
|
||||
id: Joi.number().integer().required().min(1).max(999999999), // Device ID is required for manual registration
|
||||
id: Joi.string().required().min(1).max(255), // Device ID is required for manual registration - can be string or number
|
||||
name: Joi.string().max(255).allow('').optional(),
|
||||
geo_lat: Joi.number().min(-90).max(90).optional(),
|
||||
geo_lon: Joi.number().min(-180).max(180).optional(),
|
||||
|
||||
Reference in New Issue
Block a user