From 5f6ad0c1b2d6bb263095c5ae1f85491ba5753bf5 Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Fri, 19 Feb 2021 10:25:36 +0800 Subject: [PATCH 1/6] fix: sign at home bug --- api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.js b/api.js index 1187ad3..aa92bd8 100644 --- a/api.js +++ b/api.js @@ -214,7 +214,7 @@ class School { async loadSchoolFromToml(toml) { if (!this.conf.get('school')) { - const isSignAtHome = toml.addr + const isSignAtHome = toml.users[0].addr const school = await this.schoolApi(toml.school, isSignAtHome) if (!isSignAtHome) school.addr = await this.schoolAddr(school.name) this.conf.set('school', school) From 1b4ee70519fb12f794e89caa5393ef20e6903b53 Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Fri, 19 Feb 2021 10:28:46 +0800 Subject: [PATCH 2/6] fix(tcb): update deps --- serverless/cea/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless/cea/package.json b/serverless/cea/package.json index c67f321..3596256 100644 --- a/serverless/cea/package.json +++ b/serverless/cea/package.json @@ -10,6 +10,6 @@ "author": "", "license": "ISC", "dependencies": { - "@beetcb/cea": "^1.1.9" + "@beetcb/cea": "^2.0.0" } } From 06de1f1fe28be5831f571f4a46fbb0cdac6e3e8e Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Fri, 19 Feb 2021 11:21:28 +0800 Subject: [PATCH 3/6] fix(api): random addr error --- campusphere/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/campusphere/app.js b/campusphere/app.js index 869268c..4840956 100644 --- a/campusphere/app.js +++ b/campusphere/app.js @@ -121,7 +121,8 @@ exports.signApp = class signApp extends campusphereApp { // Hard coded position info // Randomly generated from http://api.map.baidu.com/lbsapi const userAddr = this.user.addr - const posGenFromCitys = userAddr + const noRandom = !(typeof userAddr === 'string') + const posGenFromCitys = noRandom ? [userAddr] : [ ['116.622631', '40.204822', '北京市顺义区X012'], From 2b109c61486e4e26905942724ebc88f2042cbb25 Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Fri, 19 Feb 2021 11:27:25 +0800 Subject: [PATCH 4/6] fix: update cea deps --- serverless/cea/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless/cea/package.json b/serverless/cea/package.json index 3596256..5a0919f 100644 --- a/serverless/cea/package.json +++ b/serverless/cea/package.json @@ -10,6 +10,6 @@ "author": "", "license": "ISC", "dependencies": { - "@beetcb/cea": "^2.0.0" + "@beetcb/cea": "^2.0.1" } } From ec9a23eb822f9f77d6d69cb73a660fd7f40a8c31 Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Fri, 19 Feb 2021 11:21:28 +0800 Subject: [PATCH 5/6] fix(api): random addr error --- campusphere/app.js | 3 ++- package.json | 2 +- serverless/cea/package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/campusphere/app.js b/campusphere/app.js index 869268c..4840956 100644 --- a/campusphere/app.js +++ b/campusphere/app.js @@ -121,7 +121,8 @@ exports.signApp = class signApp extends campusphereApp { // Hard coded position info // Randomly generated from http://api.map.baidu.com/lbsapi const userAddr = this.user.addr - const posGenFromCitys = userAddr + const noRandom = !(typeof userAddr === 'string') + const posGenFromCitys = noRandom ? [userAddr] : [ ['116.622631', '40.204822', '北京市顺义区X012'], diff --git a/package.json b/package.json index 6b0adbc..3a91867 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@beetcb/cea", - "version": "1.1.9", + "version": "2.0.1", "description": "campusphere-elegant-auth: login to swms/campusphere at ease", "main": "dist/api.js", "bin": "dist/cli.js", diff --git a/serverless/cea/package.json b/serverless/cea/package.json index 3596256..5a0919f 100644 --- a/serverless/cea/package.json +++ b/serverless/cea/package.json @@ -10,6 +10,6 @@ "author": "", "license": "ISC", "dependencies": { - "@beetcb/cea": "^2.0.0" + "@beetcb/cea": "^2.0.1" } } From 0fdb490233742890a8be3538dfb3b10c27f95bfb Mon Sep 17 00:00:00 2001 From: beet <63141491+beetcb@users.noreply.github.com> Date: Fri, 19 Feb 2021 04:16:54 +0000 Subject: [PATCH 6/6] fix: username typos --- campusphere/app.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/campusphere/app.js b/campusphere/app.js index 4840956..d281cc6 100644 --- a/campusphere/app.js +++ b/campusphere/app.js @@ -104,7 +104,7 @@ exports.signApp = class signApp extends campusphereApp { const logInfo = { 签到结果: res.message, 签到地址: form.position, - 真实信息: signedStuInfo.userNamdd, + 真实信息: signedStuInfo.userName, } // Hide sensitive info on github actions, cause it's public by default diff --git a/package.json b/package.json index 3a91867..3e99d48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@beetcb/cea", - "version": "2.0.1", + "version": "2.0.2", "description": "campusphere-elegant-auth: login to swms/campusphere at ease", "main": "dist/api.js", "bin": "dist/cli.js",