mirror of
https://gitlab.com/SukkaW/ruleset.skk.moe.git
synced 2025-12-31 17:40:25 +00:00
deploy: SukkaW/Surge@a1f160c338
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
/* global $request, $done */
|
||||
|
||||
const url = $request.url;
|
||||
const newHeaders = {
|
||||
Crack: 'Sukka',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Headers': '*',
|
||||
'Access-Control-Allow-Method': '*',
|
||||
'Access-Control-Allow-Credentials': 'true'
|
||||
};
|
||||
let obj = {};
|
||||
|
||||
if (url.includes('/admin/service/registration/validateDevice')) {
|
||||
obj = {
|
||||
cacheExpirationDays: 365,
|
||||
message: 'Device Valid',
|
||||
resultCode: 'GOOD'
|
||||
};
|
||||
} else if (url.includes('/admin/service/appstore/register')) {
|
||||
obj = {
|
||||
featId: '',
|
||||
registered: true,
|
||||
expDate: '2099-01-01',
|
||||
key: ''
|
||||
};
|
||||
} else if (url.includes('/admin/service/registration/validate')) {
|
||||
obj = {
|
||||
featId: '',
|
||||
registered: true,
|
||||
expDate: '2099-01-01',
|
||||
key: ''
|
||||
};
|
||||
} else if (url.includes('/admin/service/registration/getStatus')) {
|
||||
obj = {
|
||||
planType: 'Sukka',
|
||||
deviceStatus: '',
|
||||
subscriptions: []
|
||||
};
|
||||
} else if (url.includes('/admin/service/supporter/retrievekey')) {
|
||||
obj = {
|
||||
Success: false,
|
||||
ErrorMessage: 'Supporter not found'
|
||||
};
|
||||
}
|
||||
|
||||
const newBody = JSON.stringify(obj);
|
||||
|
||||
const myResponse = {
|
||||
status: 200,
|
||||
headers: newHeaders,
|
||||
body: newBody
|
||||
};
|
||||
|
||||
$done(myResponse);
|
||||
@@ -1,16 +0,0 @@
|
||||
/* global $response, $done */
|
||||
|
||||
let body = $response.body;
|
||||
body = JSON.parse(body);
|
||||
if (body?.response) {
|
||||
body.response = body.response || {};
|
||||
body.response.user = body.response.user || {};
|
||||
body.response.user.is_premium = true;
|
||||
}
|
||||
if (body?.user) {
|
||||
body.user = body.user || {};
|
||||
body.user.is_premium = true;
|
||||
}
|
||||
body = JSON.stringify(body);
|
||||
|
||||
$done({ body });
|
||||
Reference in New Issue
Block a user