MCPcopy
hub / github.com/chavyleung/scripts / sign

Function sign

feng/feng.js:37–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37function sign() {
38 const loginOpts = $.getjson($.KEY_login)
39 const url = {
40 url: `https://api.wfdata.club/v1/attendance/userSignIn`,
41 body: '',
42 headers: {
43 'Content-Type': `application/x-www-form-urlencoded`,
44 'User-Agent': `fengapp/6.4 (com.feng.New.WPForumClient; build:21.03.14; iOS 14.4.1) Alamofire/4.9.1`,
45 'X-Request-Id': encrypt(`url=/v1/attendance/userSignIn$time=${new Date().getTime()}`),
46 'X-Running-Env': loginOpts['headers']['X-Running-Env'],
47 'X-Access-Token': $.login.accessToken
48 }
49 }
50 return $.http
51 .post(url)
52 .then((resp) => {
53 $.sign = JSON.parse(resp.body)
54 })
55 .catch((err) => console.log(err))
56}
57
58function showmsg() {
59 const signCode = $.sign.status.code

Callers 1

feng.jsFile · 0.70

Calls 4

encryptFunction · 0.70
getjsonMethod · 0.45
postMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…