zhangchunrui 4 settimane fa
parent
commit
29ff1cafc1
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      addLiq.mjs

+ 2 - 0
addLiq.mjs

@@ -3,7 +3,9 @@ export const addLiquidity = async (position, symbol, maxUsdValue) => {
 	fetch('http://91.108.80.73/api/lp-copy', {
 		method: 'POST',
 		headers: {
+			// 添加 basic auth
 			'Content-Type': 'application/json',
+			'Authorization': 'Basic ' + Buffer.from('admin:c5889967').toString('base64'),
 		},
 		body: JSON.stringify({
 			positionAddress: position.positionAddress,