fix: use singular for for customer entity
This commit is contained in:
parent
f7dd15e775
commit
fab419d974
3 changed files with 6 additions and 5 deletions
|
|
@ -58,7 +58,7 @@ async function directMessages(path) {
|
||||||
try {
|
try {
|
||||||
const {data} = await LNbits.api.request(
|
const {data} = await LNbits.api.request(
|
||||||
'GET',
|
'GET',
|
||||||
'/nostrmarket/api/v1/customers',
|
'/nostrmarket/api/v1/customer',
|
||||||
this.inkey
|
this.inkey
|
||||||
)
|
)
|
||||||
this.customers = data
|
this.customers = data
|
||||||
|
|
@ -89,7 +89,7 @@ async function directMessages(path) {
|
||||||
try {
|
try {
|
||||||
const {data} = await LNbits.api.request(
|
const {data} = await LNbits.api.request(
|
||||||
'POST',
|
'POST',
|
||||||
'/nostrmarket/api/v1/customers',
|
'/nostrmarket/api/v1/customer',
|
||||||
this.adminkey,
|
this.adminkey,
|
||||||
{
|
{
|
||||||
public_key: this.newPublicKey,
|
public_key: this.newPublicKey,
|
||||||
|
|
@ -97,6 +97,7 @@ async function directMessages(path) {
|
||||||
unread_messages: 0
|
unread_messages: 0
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
this.newPublicKey = null
|
||||||
this.activePublicKey = data.public_key
|
this.activePublicKey = data.public_key
|
||||||
await this.selectActiveCustomer()
|
await this.selectActiveCustomer()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ async function orderList(path) {
|
||||||
try {
|
try {
|
||||||
const {data} = await LNbits.api.request(
|
const {data} = await LNbits.api.request(
|
||||||
'GET',
|
'GET',
|
||||||
'/nostrmarket/api/v1/customers',
|
'/nostrmarket/api/v1/customer',
|
||||||
this.inkey
|
this.inkey
|
||||||
)
|
)
|
||||||
this.customers = data
|
this.customers = data
|
||||||
|
|
|
||||||
|
|
@ -799,7 +799,7 @@ async def api_create_message(
|
||||||
######################################## CUSTOMERS ########################################
|
######################################## CUSTOMERS ########################################
|
||||||
|
|
||||||
|
|
||||||
@nostrmarket_ext.get("/api/v1/customers")
|
@nostrmarket_ext.get("/api/v1/customer")
|
||||||
async def api_get_customers(
|
async def api_get_customers(
|
||||||
wallet: WalletTypeInfo = Depends(get_key_type),
|
wallet: WalletTypeInfo = Depends(get_key_type),
|
||||||
) -> List[Customer]:
|
) -> List[Customer]:
|
||||||
|
|
@ -821,7 +821,7 @@ async def api_get_customers(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@nostrmarket_ext.post("/api/v1/customers")
|
@nostrmarket_ext.post("/api/v1/customer")
|
||||||
async def api_createcustomer(
|
async def api_createcustomer(
|
||||||
data: Customer,
|
data: Customer,
|
||||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
wallet: WalletTypeInfo = Depends(require_admin_key),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue