(id, part, o)
| 88 | } |
| 89 | |
| 90 | function SaveAccount(id, part, o) { |
| 91 | if (!list[id]) { |
| 92 | list[id] = {}; |
| 93 | const text = `Account ID "${id}" saved. (total ${Object.keys(list).length}) 🎉`; |
| 94 | $.notify('TestFlight Account', '', text); |
| 95 | $.info(text); |
| 96 | }; |
| 97 | list[id][k1] = (part || req.headers)[k1]; |
| 98 | list[id][k2] = (part || req.headers)[k2]; |
| 99 | list[id][k3] = (part || req.headers)[k3]; |
| 100 | if (o) { |
| 101 | if (list[id].only) { |
| 102 | list[id].only.push(o); |
| 103 | $.notify('TestFlight Account', '', `App ID "${o}" saved 🎉`); |
| 104 | } else { |
| 105 | list[id].only = [o]; |
| 106 | } |
| 107 | } |
| 108 | return $.write(list, 'AccountList'), list; |
| 109 | } |
| 110 | |
| 111 | function formatHeaders(h) { |
| 112 | return Object.keys(h).reduce((t, i) => (t[i.toLowerCase()] = h[i], t), {}) |
no test coverage detected