mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-14 02:00:37 +08:00
Fix Script
This commit is contained in:
parent
7d10b10719
commit
7af5453b45
@ -1,6 +1,6 @@
|
|||||||
const url = $request.url;
|
const url = $request.url;
|
||||||
const newHeaders = {
|
const newHeaders = {
|
||||||
Crack: 'KS',
|
Crack: 'Sukka',
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
'Access-Control-Allow-Headers': '*',
|
'Access-Control-Allow-Headers': '*',
|
||||||
'Access-Control-Allow-Method': '*',
|
'Access-Control-Allow-Method': '*',
|
||||||
|
|||||||
@ -1,8 +1,14 @@
|
|||||||
let body = $response.body;
|
let body = $response.body;
|
||||||
body = JSON.parse(body);
|
body = JSON.parse(body);
|
||||||
if (body?.response?.user?.is_premium) {
|
if (body?.response) {
|
||||||
|
body.response = body.response || {};
|
||||||
|
body.response.user = body.response.user || {};
|
||||||
body.response.user.is_premium = true;
|
body.response.user.is_premium = true;
|
||||||
}
|
}
|
||||||
|
if (body?.user) {
|
||||||
|
body.user = body.user || {};
|
||||||
|
body.user.is_premium = true;
|
||||||
|
}
|
||||||
body = JSON.stringify(body);
|
body = JSON.stringify(body);
|
||||||
|
|
||||||
$done({ body })
|
$done({ body })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user