u
This commit is contained in:
@@ -7,6 +7,7 @@ import * as googleAuth from '../../db/googleAuth.js';
|
||||
import { clearCachedUser } from '../middleware/auth.js';
|
||||
import { emit } from '../sse.js';
|
||||
import { initCompanyVfs } from '../../tools/vfs.js';
|
||||
import { createDefaultLabelTemplates } from '../../services/defaultLabelTemplates.js';
|
||||
import { executeCompanyImport } from '../../services/companyImport.js';
|
||||
import { executeCompanyExport } from '../../services/companyExport.js';
|
||||
import { clearCompanyPrinters } from '../../services/companyPrinterService.js';
|
||||
@@ -217,6 +218,11 @@ export function register(app, basePath = '') {
|
||||
} catch (vfsErr) {
|
||||
console.error('Failed to initialize company VFS:', vfsErr);
|
||||
}
|
||||
try {
|
||||
await createDefaultLabelTemplates(req.user.id);
|
||||
} catch (tplErr) {
|
||||
console.error('Failed to create default label templates:', tplErr);
|
||||
}
|
||||
const authRow = await googleAuth.getAllowedEmail(req.user.email);
|
||||
res.status(201).json({ company, user: userPayload(authRow) });
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user