Fix jwt-token
This commit is contained in:
@@ -382,7 +382,10 @@ router.get('/', authenticateToken, requireRole(['admin']), async (req, res) => {
|
||||
async function loginLocal(req, res, next) {
|
||||
try {
|
||||
const { username, password } = req.body;
|
||||
const { Tenant } = require('../models');
|
||||
|
||||
// Use test models if available, otherwise use regular models
|
||||
const models = global.__TEST_MODELS__ || require('../models');
|
||||
const { Tenant } = models;
|
||||
|
||||
// Get tenant information from request (set by multi-tenant auth middleware)
|
||||
let tenantId = null;
|
||||
|
||||
Reference in New Issue
Block a user