feat: part: republish to nostr
This commit is contained in:
parent
05ecc65e5a
commit
ccb32dba99
3 changed files with 35 additions and 3 deletions
|
|
@ -24,9 +24,17 @@
|
|||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item @click="republishMerchantData" disable clickable v-close-popup>
|
||||
<q-item-section>
|
||||
<q-item-label>Republish to Nostr</q-item-label>
|
||||
<q-item-label caption
|
||||
>Republish all stalls, products and orders to Nostr</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item @click="deleteMerchantTables" clickable v-close-popup>
|
||||
<q-item-section>
|
||||
<q-item-label>Delete Merchant from DB</q-item-label>
|
||||
<q-item-label>Delete from DB</q-item-label>
|
||||
<q-item-label caption
|
||||
>Delete all stalls, products and orders from database</q-item-label
|
||||
>
|
||||
|
|
@ -34,7 +42,7 @@
|
|||
</q-item>
|
||||
<q-item @click="deleteMerchantFromNostr" clickable v-close-popup>
|
||||
<q-item-section>
|
||||
<q-item-label>Delete Merchant from Nostr</q-item-label>
|
||||
<q-item-label>Delete from Nostr</q-item-label>
|
||||
<q-item-label caption
|
||||
>Delete all stalls, products and orders from Nostr</q-item-label
|
||||
>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,31 @@ async function merchantDetails(path) {
|
|||
this.showKeys = !this.showKeys
|
||||
this.$emit('show-keys', this.showKeys)
|
||||
},
|
||||
|
||||
republishMerchantData: function () {
|
||||
LNbits.utils
|
||||
.confirmDialog(
|
||||
`You are about to republish to Nostr`
|
||||
)
|
||||
.onOk(async () => {
|
||||
try {
|
||||
await LNbits.api.request(
|
||||
'PATCH',
|
||||
`/nostrmarket/api/v1/merchant/${this.merchantId}/nostr`,
|
||||
this.adminkey
|
||||
)
|
||||
this.$emit('merchant-deleted', this.merchantId)
|
||||
this.$q.notify({
|
||||
type: 'positive',
|
||||
message: 'Merchant Deleted',
|
||||
timeout: 5000
|
||||
})
|
||||
} catch (error) {
|
||||
console.warn(error)
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteMerchantTables: function () {
|
||||
LNbits.utils
|
||||
.confirmDialog(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue