Compare commits

...

3 Commits

Author SHA1 Message Date
PorridgePi
419c06ed90 fix: JSON url, iterate non_subscriptions, do not define $request and $response 2023-10-23 01:06:57 +08:00
PorridgePi
2f0b6c4e90 JSON: feat: add Happy:Days 2023-10-23 00:01:03 +08:00
PorridgePi
fd7b99bdbc README: fix: rename heading 2023-10-20 13:20:58 +08:00
3 changed files with 13 additions and 13 deletions

View File

@@ -1,2 +1 @@
# json # QX
# json

View File

@@ -1,4 +1,4 @@
const storageKeyName = "rc_rewrite_ddata"; const storageKeyName = "rc_rewrite_data";
const jobTitle = "update_rc"; const jobTitle = "update_rc";
const notificationTitle = "Update RevenueCat JSON" const notificationTitle = "Update RevenueCat JSON"
@@ -7,7 +7,7 @@ let URL = "";
// URL = "https://stackoverflow.com/questions/38708550/difference-between-return-await-promise-and-return-promise" // URL = "https://stackoverflow.com/questions/38708550/difference-between-return-await-promise-and-return-promise"
// URL = "http://localhost:8000/rc_rewrite_data.json"; // URL = "http://localhost:8000/rc_rewrite_data.json";
// URL = "https://api.jsonbin.io/v3/qs/651be8b30574da7622b3b246"; // URL = "https://api.jsonbin.io/v3/qs/651be8b30574da7622b3b246";
URL = "https://git.ykz.app/PorridgePi/json/raw/branch/main/rc_rewrite_data.json"; URL = "https://git.ykz.app/PorridgePi/qx/raw/branch/main/rc_rewrite_data.json";
// URL = "https://porridgepi.github.io/json/rc_rewrite_data.json" // URL = "https://porridgepi.github.io/json/rc_rewrite_data.json"
requestOpts = { requestOpts = {
@@ -205,7 +205,7 @@ async function onResponse(context, url, request, response) {
"purchase_date": "2020-01-01T00:00:00Z" "purchase_date": "2020-01-01T00:00:00Z"
} }
} }
for (const i of rewriteItem.new_other_purchases) { for (const i of rewriteItem.new_non_subscriptions) {
body.subscriber.other_purchases[i] = { body.subscriber.other_purchases[i] = {
purchase_date: "2020-01-01T00:00:00Z" purchase_date: "2020-01-01T00:00:00Z"
} }
@@ -225,7 +225,7 @@ async function onResponse(context, url, request, response) {
response.statusCode = 200; response.statusCode = 200;
response.statusPhrase = "OK"; response.statusPhrase = "OK";
response.headers["Content-Type"] = "application/json"; response.headers["Content-Type"] = "application/json";
console.log(response.body); console.log(JSON.stringify(response.body));
break; break;
} }
@@ -233,9 +233,6 @@ async function onResponse(context, url, request, response) {
return response; return response;
} }
var $request, $response;
async function main() { async function main() {
console.log("Starting..."); console.log("Starting...");
if (isSurge || isQuanX) { if (isSurge || isQuanX) {

View File

@@ -185,13 +185,17 @@
"new_other_purchases": [] "new_other_purchases": []
}, },
{ {
"name": "", "name": "Happy:Days",
"isEnabled": true, "isEnabled": true,
"bundle_id": "", "bundle_id": "com.floatingislandapps.happydays",
"user_agent": null, "user_agent": null,
"new_entitlements": [], "new_entitlements": [
"pro"
],
"new_subscriptions": [], "new_subscriptions": [],
"new_non_subscriptions": [], "new_non_subscriptions": [
"happy_999_lifetime"
],
"new_other_purchases": [] "new_other_purchases": []
}, },
{ {