feat(migration): enforce ownerId requirement in Product table
- Removed all products without an owner to maintain data integrity. - Updated ownerId column to be non-nullable. - Modified foreign key constraint for ownerId to use ON DELETE CASCADE.
This commit is contained in:
@@ -49,6 +49,7 @@ export class ReceiptImportController {
|
||||
);
|
||||
}
|
||||
const isPremium = req?.user?.isPremium === true || req?.user?.role === 'admin';
|
||||
return this.receiptImportService.parseReceipt(file, isPremium);
|
||||
const userId = typeof req?.user?.id === 'number' ? req.user.id : undefined;
|
||||
return this.receiptImportService.parseReceipt(file, isPremium, userId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user