feat: publish event on C_UD for stalls

This commit is contained in:
Vlad Stan 2023-03-02 10:14:11 +02:00
parent aba3706a71
commit 5972c44ad1
7 changed files with 305 additions and 40 deletions

View file

@ -30,7 +30,7 @@ async function stallList(path) {
name: this.stallDialog.data.name,
wallet: this.stallDialog.data.wallet,
currency: this.stallDialog.data.currency,
shipping_zones: this.stallDialog.data.shippingZones.map(z => z.id),
shipping_zones: this.stallDialog.data.shippingZones,
config: {}
})
},
@ -71,10 +71,14 @@ async function stallList(path) {
'/nostrmarket/api/v1/zone',
this.inkey
)
console.log('### zones', data)
this.zoneOptions = data.map(z => ({
id: z.id,
label: `${z.name} (${z.countries.join(', ')})`
...z,
label: z.name
? `${z.name} (${z.countries.join(', ')}})`
: z.countries.join(', ')
}))
console.log('### this.zoneOptions', this.zoneOptions)
} catch (error) {
LNbits.utils.notifyApiError(error)
}