Skip to content

Commit 40a9d0d

Browse files
committed
latest build
1 parent 15636da commit 40a9d0d

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

dist/client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
</head>
1919
<body>
2020
<div id="app"></div>
21-
<script type="text/javascript" src="/main-6b3f957541322c169fbc.js"></script></body>
21+
<script type="text/javascript" src="/main-a57cf09b16f2cae690f5.js"></script></body>
2222
</html>
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/client/main-6b3f957541322c169fbc.js.map renamed to dist/client/main-a57cf09b16f2cae690f5.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/server/twitter.js

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,33 @@ var Twitter = /*#__PURE__*/function () {
6363
this.accessToken = keys.accessToken || process.env.ACCESS_TOKEN;
6464
this.accessTokenSecret = keys.accessTokenSecret || process.env.ACCESS_TOKEN_SECRET; // a client for v1.1 endpoints
6565

66-
this.twit = new _twit["default"]({
67-
consumer_key: this.consumerKey,
68-
consumer_secret: this.consumerSecret,
69-
access_token: this.accessToken,
70-
access_token_secret: this.accessTokenSecret
71-
}); // a client for v2 endpoints
72-
73-
this.twitterV2 = new _twitterV["default"]({
74-
consumer_key: this.consumerKey,
75-
consumer_secret: this.consumerSecret,
76-
access_token_key: this.accessToken,
77-
access_token_secret: this.accessTokenSecret
78-
}); // a app auth client for v2 endpoints
79-
80-
this.twitterV2app = new _twitterV["default"]({
81-
consumer_key: this.consumerKey,
82-
consumer_secret: this.consumerSecret
83-
});
66+
if (this.consumerKey && this.consumerSecret && this.accessToken && this.accessTokenSecret) {
67+
this.twit = new _twit["default"]({
68+
consumer_key: this.consumerKey,
69+
consumer_secret: this.consumerSecret,
70+
access_token: this.accessToken,
71+
access_token_secret: this.accessTokenSecret
72+
}); // a client for v2 endpoints
73+
74+
this.twitterV2 = new _twitterV["default"]({
75+
consumer_key: this.consumerKey,
76+
consumer_secret: this.consumerSecret,
77+
access_token_key: this.accessToken,
78+
access_token_secret: this.accessTokenSecret
79+
});
80+
} else {
81+
_logger["default"].warn('not configuring user client for v1.1 and v2 endpoints since not all keys are present');
82+
} // a app auth client for v2 endpoints
83+
84+
85+
if (this.consumerKey && this.consumerSecret) {
86+
this.twitterV2app = new _twitterV["default"]({
87+
consumer_key: this.consumerKey,
88+
consumer_secret: this.consumerSecret
89+
});
90+
} else {
91+
_logger["default"].warn('unable to configure app client for v2 endpoint since not all keys are present');
92+
}
8493
}
8594

8695
(0, _createClass2["default"])(Twitter, [{

0 commit comments

Comments
 (0)