regNameSurnameMandatory

askUSernameTelegramToTheReg
@ davanti all'username
This commit is contained in:
Surya Paolo
2024-01-19 23:38:08 +01:00
parent dbcdbd689b
commit e4504bcf9e
3 changed files with 8 additions and 6 deletions

View File

@@ -152,7 +152,7 @@ router.post('/import', authenticate, async (req, res) => {
recGas = await Gasordine.findOne({ idapp, name: product.gas_name }).lean();
}
if (!recGas) {
if (!recGas && !!product.gas_name) {
recGas = new Gasordine({ idapp, name: product.gas_name, active: true });
// Non esiste questo GAS, quindi lo creo !
ris = await recGas.save();