- creato editor di Pagine (iniziato)

- fix: mancano i "t," su alcuni componenti...
This commit is contained in:
Surya Paolo
2025-09-02 16:22:31 +02:00
parent fcbc64cea8
commit 7ba408c053
25 changed files with 321 additions and 260 deletions

View File

@@ -1126,23 +1126,6 @@ async function eseguiDbOpUser(idapp, mydata, locale, req, res) {
await User.findOneAndUpdate({ _id: mydata._id }, { $set: { 'profile.noCircIta': mydata.value } });
} else if (mydata.dbop === 'noFoto') {
await User.findOneAndUpdate({ _id: mydata._id }, { $set: { 'profile.noFoto': mydata.value } });
} else if (mydata.dbop === 'convertProductInfos') {
const products = await Product.find({ idProductInfo: { $exists: true } });
for (const product of products) {
const productInfo = await ProductInfo.findById(product.idProductInfo);
if (productInfo) {
const productInfoObj = productInfo.toObject();
delete productInfoObj._id;
delete productInfoObj.__v;
await Product.updateOne(
{ _id: product._id },
{
$set: { productInfo: productInfoObj },
$unset: { idProductInfo: 1 },
}
);
}
}
}
} catch (e) {
console.log(e.message);