@app-connect/core 1.7.0-beta.3 → 1.7.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/handlers/admin.js CHANGED
@@ -73,6 +73,11 @@ async function updateServerLoggingSettings({ user, additionalFieldValues }) {
73
73
 
74
74
  async function getAdminReport({ rcAccountId, timezone, timeFrom, timeTo }) {
75
75
  try {
76
+ if (!process.env.RINGCENTRAL_SERVER || !process.env.RINGCENTRAL_CLIENT_ID || !process.env.RINGCENTRAL_CLIENT_SECRET) {
77
+ return {
78
+ callLogStats: {}
79
+ };
80
+ }
76
81
  const rcSDK = new RingCentral({
77
82
  server: process.env.RINGCENTRAL_SERVER,
78
83
  clientId: process.env.RINGCENTRAL_CLIENT_ID,
@@ -127,6 +132,11 @@ async function getAdminReport({ rcAccountId, timezone, timeFrom, timeTo }) {
127
132
 
128
133
  async function getUserReport({ rcAccountId, rcExtensionId, timezone, timeFrom, timeTo }) {
129
134
  try {
135
+ if (!process.env.RINGCENTRAL_SERVER || !process.env.RINGCENTRAL_CLIENT_ID || !process.env.RINGCENTRAL_CLIENT_SECRET) {
136
+ return {
137
+ callLogStats: {}
138
+ };
139
+ }
130
140
  const rcSDK = new RingCentral({
131
141
  server: process.env.RINGCENTRAL_SERVER,
132
142
  clientId: process.env.RINGCENTRAL_CLIENT_ID,
package/handlers/auth.js CHANGED
@@ -209,6 +209,9 @@ async function authValidation({ platform, userId }) {
209
209
 
210
210
  // Ringcentral
211
211
  async function onRingcentralOAuthCallback({ code, rcAccountId }) {
212
+ if (!process.env.RINGCENTRAL_SERVER || !process.env.RINGCENTRAL_CLIENT_ID || !process.env.RINGCENTRAL_CLIENT_SECRET) {
213
+ return;
214
+ }
212
215
  const rcSDK = new RingCentral({
213
216
  server: process.env.RINGCENTRAL_SERVER,
214
217
  clientId: process.env.RINGCENTRAL_CLIENT_ID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-connect/core",
3
- "version": "1.7.0-beta.3",
3
+ "version": "1.7.0-beta.4",
4
4
  "description": "RingCentral App Connect Core",
5
5
  "main": "index.js",
6
6
  "repository": {