Created
October 20, 2019 20:10
-
-
Save PamornT/a5a194b632c5b852ded583cc585edc01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
if(event.message.text === 'register') { | |
let access_token = await issue_access_token(); | |
access_token = JSON.parse(access_token); | |
await initialLINE(access_token['token_type'], access_token['access_token']); | |
await admin.database().ref('token').child(event.source.userId).set(access_token); | |
reply(event.replyToken, { | |
type: 'text', | |
text: '\uDBC0\uDC7F ลงทะเบียน token เรียบร้อยแล้ว เอาไปใช้ได้เลย\n\n' + JSON.stringify(access_token) | |
}); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment