Fix jwt-token
This commit is contained in:
@@ -124,8 +124,8 @@ def get_next_device_id():
|
||||
def create_stockholm_device():
|
||||
"""Create a device positioned over Stockholm Castle"""
|
||||
|
||||
# Get next available device ID
|
||||
device_id = get_next_device_id()
|
||||
# Use device_id=1 for Stockholm Castle as requested
|
||||
device_id = "1"
|
||||
|
||||
# Device data for Stockholm Castle
|
||||
device_data = {
|
||||
|
||||
@@ -24,7 +24,7 @@ module.exports = (sequelize) => {
|
||||
}
|
||||
},
|
||||
device_id: {
|
||||
type: DataTypes.UUID,
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: true, // Allow null for testing
|
||||
references: {
|
||||
model: 'devices',
|
||||
|
||||
@@ -3,8 +3,7 @@ const { DataTypes } = require('sequelize');
|
||||
module.exports = (sequelize) => {
|
||||
const Device = sequelize.define('Device', {
|
||||
id: {
|
||||
type: DataTypes.UUID,
|
||||
defaultValue: sequelize.Sequelize.UUIDV4,
|
||||
type: DataTypes.STRING(255),
|
||||
primaryKey: true,
|
||||
allowNull: false,
|
||||
comment: 'Unique device identifier'
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = (sequelize) => {
|
||||
primaryKey: true
|
||||
},
|
||||
device_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
references: {
|
||||
model: 'devices',
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = (sequelize) => {
|
||||
primaryKey: true
|
||||
},
|
||||
device_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
type: DataTypes.STRING(255),
|
||||
allowNull: false,
|
||||
references: {
|
||||
model: 'devices',
|
||||
|
||||
Reference in New Issue
Block a user