Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-Santana-j committed Nov 17, 2024
1 parent 6ab842b commit bdce944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ app.get('/server/sales/:id', functions.authGetState, functions.subscriptionStatu
});


let productsSimple = server.products.filter(product => {
let productsSimple = 'products' in server ? server.products.filter(product => {
let typeProduct = 'typeProduct' in product ? product.typeProduct : 'normal';
return typeProduct != 'multiple';
}).map(product => {
Expand All @@ -335,7 +335,7 @@ app.get('/server/sales/:id', functions.authGetState, functions.subscriptionStatu
desc: `Preço: ${functions.formatarMoeda(product.price)} • Estoque: ${estoqueNumber}`,
value: product.productID
}
})
}) : []

res.render('sales', { perms: verifyPerms.perms, chatItens: chatItens, host: `${webConfig.host}`, bankData: bankData, user: user, server: server, cargosString: JSON.stringify(roleObjects), channels: textChannels, channelsString: JSON.stringify(textChannels), formatarMoeda: functions.formatarMoeda, productString: JSON.stringify(productsSimple) })
})
Expand Down

0 comments on commit bdce944

Please sign in to comment.