Skip to content

Commit

Permalink
feat: use env set Administrator
Browse files Browse the repository at this point in the history
  • Loading branch information
bestony committed Jan 29, 2019
1 parent 26d83d3 commit 7da9f25
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cloudfunctions/checkUserAuth/index.js
Expand Up @@ -5,11 +5,8 @@ cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
const wxContext = cloud.getWXContext()

const administrator = [
"ocdyO4u6-0Gf92PZUWAsEK4LxkuI"
];
const wxContext = cloud.getWXContext()
const administrator = process.env.ADMIN.split('|');

if (administrator.indexOf(wxContext.OPENID) == -1){
return {
Expand Down

0 comments on commit 7da9f25

Please sign in to comment.