id -> invoice_id
This commit is contained in:
parent
7214981aff
commit
4241a20926
@ -55,10 +55,10 @@ async def create_invoice(token, dst_username, amount=None):
|
||||
data['amount'] = amount
|
||||
return await call('api/create_invoice/', data)
|
||||
|
||||
async def delete_invoice(token, id):
|
||||
data = {'token': token, 'id': id}
|
||||
async def delete_invoice(token, invoice_id):
|
||||
data = {'token': token, 'invoice_id': invoice_id}
|
||||
return await call('api/delete_invoice/', data)
|
||||
|
||||
async def get_invoice(token, id):
|
||||
data = {'token': token, 'id': id}
|
||||
async def get_invoice(token, invoice_id):
|
||||
data = {'token': token, 'invoice_id': invoice_id}
|
||||
return await call('api/get_invoice/', data)
|
||||
@ -192,7 +192,7 @@ async def delete_invoice_api(
|
||||
if not await token_check(username, user_token):
|
||||
raise HTTPException(status_code=401, detail='Invalid username or token')
|
||||
await log(session, user_token, f'/delete_invoice: (id: {invoice_id})')
|
||||
return await delete_invoice(token=SYSTEM_API_TOKEN, id=invoice_id)
|
||||
return await delete_invoice(token=SYSTEM_API_TOKEN, invoice_id=invoice_id)
|
||||
|
||||
# IN : username (str), user_token (str), invoice_id (str)
|
||||
# OUT: {
|
||||
@ -211,7 +211,7 @@ async def get_invoice_api(
|
||||
if not await token_check(username, user_token):
|
||||
raise HTTPException(status_code=401, detail='Invalid username or token')
|
||||
await log(session, user_token, f'/get_invoice: (id: {invoice_id})')
|
||||
return await get_invoice(token=SYSTEM_API_TOKEN, id=invoice_id)
|
||||
return await get_invoice(token=SYSTEM_API_TOKEN, invoice_id=invoice_id)
|
||||
|
||||
#------------------------- END ------------------------------
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user