refactor: move top_up_link from status API to topup info API
Move top_up_link out of the public GetStatus endpoint into the authenticated GetTopUpInfo endpoint. Update classic frontend to read topup_link from the topup info response instead of status. Also add mailto links in SECURITY.md. close #4582
This commit is contained in:
+2
-4
@@ -52,9 +52,7 @@ const TopUp = () => {
|
||||
const [topUpCount, setTopUpCount] = useState(
|
||||
statusState?.status?.min_topup || 1,
|
||||
);
|
||||
const [topUpLink, setTopUpLink] = useState(
|
||||
statusState?.status?.top_up_link || '',
|
||||
);
|
||||
const [topUpLink, setTopUpLink] = useState('');
|
||||
const [enableOnlineTopUp, setEnableOnlineTopUp] = useState(
|
||||
statusState?.status?.enable_online_topup || false,
|
||||
);
|
||||
@@ -658,6 +656,7 @@ const TopUp = () => {
|
||||
setWaffoPancakeMinTopUp(data.waffo_pancake_min_topup || 1);
|
||||
setMinTopUp(minTopUpValue);
|
||||
setTopUpCount(minTopUpValue);
|
||||
setTopUpLink(data.topup_link || '');
|
||||
|
||||
// 设置 Creem 产品
|
||||
try {
|
||||
@@ -764,7 +763,6 @@ const TopUp = () => {
|
||||
// const minTopUpValue = statusState.status.min_topup || 1;
|
||||
// setMinTopUp(minTopUpValue);
|
||||
// setTopUpCount(minTopUpValue);
|
||||
setTopUpLink(statusState.status.top_up_link || '');
|
||||
setPriceRatio(statusState.status.price || 1);
|
||||
|
||||
setStatusLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user