format
This commit is contained in:
parent
6787e4916e
commit
6996155cae
2 changed files with 30 additions and 12 deletions
|
|
@ -201,7 +201,11 @@
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="addressFormDialog.show" position="top" @hide="closeAddressFormDialog">
|
||||
<q-dialog
|
||||
v-model="addressFormDialog.show"
|
||||
position="top"
|
||||
@hide="closeAddressFormDialog"
|
||||
>
|
||||
<q-card class="q-pa-lg q-pt-xl" style="width: 500px">
|
||||
<q-form @submit="saveAddress" class="q-gutter-md">
|
||||
<q-select
|
||||
|
|
@ -576,14 +580,19 @@
|
|||
|
||||
axios
|
||||
.post(
|
||||
'/nostrnip5/api/v1/domain/' + formDialog.data.domain_id + '/address',
|
||||
'/nostrnip5/api/v1/domain/' +
|
||||
formDialog.data.domain_id +
|
||||
'/address',
|
||||
formDialog.data
|
||||
)
|
||||
.then(function (response) {
|
||||
return LNbits.api
|
||||
.request(
|
||||
return LNbits.api.request(
|
||||
'POST',
|
||||
'/nostrnip5/api/v1/domain/' + formDialog.data.domain_id + '/address/' + response.data.address_id + '/activate',
|
||||
'/nostrnip5/api/v1/domain/' +
|
||||
formDialog.data.domain_id +
|
||||
'/address/' +
|
||||
response.data.address_id +
|
||||
'/activate',
|
||||
_.findWhere(self.g.user.wallets, {id: domain.wallet}).adminkey
|
||||
)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ from lnbits.utils.exchange_rates import fiat_amount_as_satoshis
|
|||
|
||||
from . import nostrnip5_ext
|
||||
from .crud import (
|
||||
activate_address,
|
||||
create_address_internal,
|
||||
create_domain_internal,
|
||||
delete_address,
|
||||
|
|
@ -25,7 +26,6 @@ from .crud import (
|
|||
get_domain,
|
||||
get_domain_by_name,
|
||||
get_domains,
|
||||
activate_address,
|
||||
)
|
||||
from .models import CreateAddressData, CreateDomainData
|
||||
|
||||
|
|
@ -98,7 +98,11 @@ async def api_address_delete(
|
|||
|
||||
return True
|
||||
|
||||
@nostrnip5_ext.post("/api/v1/domain/{domain_id}/address/{address_id}/activate", status_code=HTTPStatus.OK)
|
||||
|
||||
@nostrnip5_ext.post(
|
||||
"/api/v1/domain/{domain_id}/address/{address_id}/activate",
|
||||
status_code=HTTPStatus.OK,
|
||||
)
|
||||
async def api_address_activate(
|
||||
domain_id: str,
|
||||
address_id: str,
|
||||
|
|
@ -108,6 +112,7 @@ async def api_address_activate(
|
|||
|
||||
return True
|
||||
|
||||
|
||||
@nostrnip5_ext.post(
|
||||
"/api/v1/domain/{domain_id}/address", status_code=HTTPStatus.CREATED
|
||||
)
|
||||
|
|
@ -161,7 +166,11 @@ async def api_address_create(
|
|||
except Exception as e:
|
||||
raise HTTPException(status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=str(e))
|
||||
|
||||
return {"payment_hash": payment_hash, "payment_request": payment_request, "address_id": address.id}
|
||||
return {
|
||||
"payment_hash": payment_hash,
|
||||
"payment_request": payment_request,
|
||||
"address_id": address.id,
|
||||
}
|
||||
|
||||
|
||||
@nostrnip5_ext.get(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue