Improve InvoicePayment() error handling.

This commit is contained in:
Gucheng Wang
2022-04-27 00:24:48 +08:00
parent e5c1f560c5
commit ea005aaf4d
11 changed files with 50 additions and 14 deletions

View File

@ -54,3 +54,10 @@ export function deletePayment(payment) {
body: JSON.stringify(newPayment),
}).then(res => res.json());
}
export function invoicePayment(owner, name) {
return fetch(`${Setting.ServerUrl}/api/invoice-payment?id=${owner}/${encodeURIComponent(name)}`, {
method: "POST",
credentials: "include"
}).then(res => res.json());
}