Skip to content

Commit

Permalink
Merge branch 'main' into issue-947-app-client-token
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengill authored May 31, 2021
2 parents dd39752 + 0bb7ae9 commit 0e5e75b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions docs/_basic/authenticating_oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ const app = new App({
installationStore: {
storeInstallation: async (installation) => {
// change the line below so it saves to your database
if (installation.isEnterpriseInstall) {
if (installation.isEnterpriseInstall && installation.enterprise !== undefined) {
// support for org wide app installation
return await database.set(installation.enterprise.id, installation);
} else {
}
if (installation.team !== undefined) {
// single team app installation
return await database.set(installation.team.id, installation);
}
Expand Down
5 changes: 3 additions & 2 deletions docs/_basic/ja_authenticating_oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ const app = new App({
installationStore: {
storeInstallation: async (installation) => {
// 実際のデータベースに保存するために、ここのコードを変更
if (installation.isEnterpriseInstall) {
if (installation.isEnterpriseInstall && installation.enterprise !== undefined) {
// OrG 全体へのインストールに対応する場合
return await database.set(installation.enterprise.id, installation);
} else {
}
if (installation.team !== undefined) {
// 単独のワークスペースへのインストールの場合
return await database.set(installation.team.id, installation);
}
Expand Down
5 changes: 3 additions & 2 deletions docs/_tutorials/ja_migration_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ installationStore: {
```javascript
installationStore: {
storeInstallation: async (installation) => {
if (installation.isEnterpriseInstall) {
if (installation.isEnterpriseInstall && installation.enterprise !== undefined) {
// support for org wide app installation
return await database.set(installation.enterprise.id, installation);
} else {
}
if (installation.team !== undefined) {
// single team app installation
return await database.set(installation.team.id, installation);
}
Expand Down
5 changes: 3 additions & 2 deletions docs/_tutorials/migration_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ After:
```javascript
installationStore: {
storeInstallation: async (installation) => {
if (installation.isEnterpriseInstall) {
if (installation.isEnterpriseInstall && installation.enterprise !== undefined) {
// support for org wide app installation
return await database.set(installation.enterprise.id, installation);
} else {
}
if (installation.team !== undefined) {
// single team app installation
return await database.set(installation.team.id, installation);
}
Expand Down

0 comments on commit 0e5e75b

Please sign in to comment.