Based on boolean value condition it should send that message to backend. Currently I made it like this:
async submit() {
...
await api.submitProduct (
productId,
product.instock.unlimited == false ? 'book' : 'ebook'
)
So it should check product's instock proper contains unlimited value which is false than it should submit 'book' else ebook. Is this the correct approach? The question is related to the following line:
product.instock.unlimited == false ? 'ebook' : 'book'