mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
url encode get request value
This commit is contained in:
parent
80877013bd
commit
52a0e684f1
@ -179,7 +179,8 @@
|
|||||||
const fetchAndDisplayQRCode = async (newBtcAmount = null) => {
|
const fetchAndDisplayQRCode = async (newBtcAmount = null) => {
|
||||||
try {
|
try {
|
||||||
const btcAmount = newBtcAmount || '{{$btc_amount}}';
|
const btcAmount = newBtcAmount || '{{$btc_amount}}';
|
||||||
const response = await fetch(`/api/v1/get-blockonomics-qr-code?qr_string=bitcoin:{{$btc_address}}?amount=${btcAmount}`);
|
const qrString = encodeURIComponent(`bitcoin:{{$btc_address}}?amount=${btcAmount}`);
|
||||||
|
const response = await fetch(`/api/v1/get-blockonomics-qr-code?qr_string=${qrString}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user