MCPcopy Create free account
hub / github.com/NobyDa/Script / ExternalAccount

Function ExternalAccount

TestFlight/TestFlightAccount.js:222–239  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

220}
221
222function ExternalAccount(key) {
223 try {
224 const k = JSON.parse(letterDecode(key));
225 $.log(`Raw data: ${key}\nDecode data: ${$.stringify(k)}`);
226 if (!k.appID || !k.accID || !k.key[k1] || !k.key[k2] || !k.key[k3]) {
227 throw new Error('Missing data');
228 } else if (appList[k.appID]) {
229 $.notify('TestFlight Account', '', `Failed, app already exists ⚠️`);
230 } else {
231 const save = SaveAccount(k.accID, k.key, k.appID);
232 }
233 } catch (e) {
234 const text = `External account parse failed`;
235 $.notify('TestFlight Account', '', `${text} ⚠️`);
236 $.error(`${text}: ${e.message || e}`);
237 }
238 return '{}'
239}
240
241function ShareAccount(appID) {
242 const raw = $.stringify({

Callers 1

runsFunction · 0.85

Calls 6

letterDecodeFunction · 0.85
SaveAccountFunction · 0.85
logMethod · 0.45
stringifyMethod · 0.45
notifyMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected