MCPcopy Create free account
hub / github.com/chavyleung/scripts / accept

Function accept

testflight/testflight.js:102–116  ·  view source on GitHub ↗
(id, har)

Source from the content-addressed store, hash-verified

100}
101
102function accept(id, har) {
103 const key = har.url.replace(/(.*accounts\/)(.*)(\/apps)/, '$2')
104 return $.http
105 .post({
106 url: `https://testflight.apple.com/v3/accounts/${key}/ru/${id}/accept`,
107 headers: getHeaders(har)
108 })
109 .then((resp) => {
110 const result = JSON.parse(resp.body)
111 return [true, '加入成功', result]
112 })
113 .catch(() => {
114 return [false, '加入失败', null]
115 })
116}
117
118function getHeaders(har) {
119 const userAgent = har.headers['user-agent']

Callers 1

joinFunction · 0.85

Calls 2

getHeadersFunction · 0.85
postMethod · 0.45

Tested by

no test coverage detected