Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化TOKEN的类型判断方式 #11

Merged
merged 1 commit into from
Nov 25, 2021
Merged

优化TOKEN的类型判断方式 #11

merged 1 commit into from
Nov 25, 2021

Conversation

Code2qing
Copy link
Contributor

@Code2qing Code2qing commented Nov 25, 2021

在secrets中传入格式化的JSON字符串,例如:

{
    "token":"zzzzzz",
    "tgUid":"1111111"
}

代码中取到的值是{\n"token": "zzzzzz",\n"tgUid": "1111111"\n},在JS里面过不了^\{.*\}$这个正则表达式的判断,会导致把整个JSON字符串当做token传入。

Copy link
Owner

@vv314 vv314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,感谢贡献😄

@vv314 vv314 merged commit 657a91a into vv314:main Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants