fix: wish url being incomplete
This commit is contained in:
parent
1aebb20262
commit
76f64cb713
2 changed files with 4 additions and 2 deletions
|
@ -29,7 +29,9 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
}
|
||||
} elseif (isset($_GET['wish_url'])) {
|
||||
if (isset($_GET['isAffiliate'])) {
|
||||
$response['isAffiliate'] = Wish::hasAffiliateLink($_GET['wish_url']);
|
||||
$wishUrl = \base64_decode($_GET['wish_url']);
|
||||
|
||||
$response['isAffiliate'] = Wish::hasAffiliateLink($wishUrl);
|
||||
} else {
|
||||
$url = trim($_GET['wish_url']);
|
||||
$cache = new Cache\Embed($url);
|
||||
|
|
|
@ -277,7 +277,7 @@ $(function () {
|
|||
|
||||
input.attr('disabled', 'disabled');
|
||||
|
||||
fetch('/index.php?page=api&module=wishes&wish_url=' + input.val() + '&isAffiliate', {
|
||||
fetch('/index.php?page=api&module=wishes&wish_url=' + window.btoa(input.val()) + '&isAffiliate', {
|
||||
'method' : 'GET',
|
||||
'credentials' : 'include',
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue