This commit is contained in:
SukkaBot
2023-12-05 06:06:30 +00:00
parent 121807d043
commit 3565c8fb05
46 changed files with 1220 additions and 1259 deletions

View File

@@ -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);

View File

@@ -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 });