Authored by htoooth

fix

@@ -16,6 +16,8 @@ async function main() { @@ -16,6 +16,8 @@ async function main() {
16 console.log(`${today} 工作`) 16 console.log(`${today} 工作`)
17 const res1 = await getconfig() 17 const res1 = await getconfig()
18 const {sessionkey} = await login() 18 const {sessionkey} = await login()
  19 + console.log(`${today} 得到session ${sessionkey}`)
  20 +
19 const res2 = await checkin({sessionkey}) 21 const res2 = await checkin({sessionkey})
20 console.log(`${today} 签到成功 ${res2}`) 22 console.log(`${today} 签到成功 ${res2}`)
21 } 23 }
@@ -16,6 +16,8 @@ async function main() { @@ -16,6 +16,8 @@ async function main() {
16 console.log(`${today} 工作`) 16 console.log(`${today} 工作`)
17 const res1 = await getconfig() 17 const res1 = await getconfig()
18 const {sessionkey} = await login() 18 const {sessionkey} = await login()
  19 + console.log(`${today} 得到session ${sessionkey}`)
  20 +
19 const res2 = await checkout({sessionkey}) 21 const res2 = await checkout({sessionkey})
20 console.log(`${today} 签出成功 ${res2}`) 22 console.log(`${today} 签出成功 ${res2}`)
21 } 23 }
1 { 1 {
2 "apps": [ 2 "apps": [
3 { 3 {
4 - "name": "checkin", 4 + "name": "yoho-private",
5 "script": "index.js", 5 "script": "index.js",
6 "instances": "1", 6 "instances": "1",
7 "merge_logs": true, 7 "merge_logs": true,
@@ -20,6 +20,7 @@ async function login() { @@ -20,6 +20,7 @@ async function login() {
20 return new Promise(function(resolve, reject) { 20 return new Promise(function(resolve, reject) {
21 request.post('/client.do', { 21 request.post('/client.do', {
22 form: data, 22 form: data,
  23 + json: true,
23 }, function(err, res, body) { 24 }, function(err, res, body) {
24 if (err) { 25 if (err) {
25 reject(err) 26 reject(err)