Skip to content

Commit cb80393

Browse files
committed
clean up javascript
1 parent c5094b5 commit cb80393

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

js/login.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ $( document ).ready(function() {
1818
// If found, pass the temp token to gatekeeper
1919
if (match) {
2020
var code = match[1];
21-
$.getJSON('http://auth.design.ros2.org/authenticate/' + code, function(data) {
21+
// var gatekeeper_domain = 'desolate-shelf-7303.herokuapp.com'; // for local testing
22+
var gatekeeper_domain = 'auth.design.ros2.org';
23+
$.getJSON('http://' + gatekeeper_domain + '/authenticate/' + code, function(data) {
2224
// Once gatekeeper gets back, check for the token
2325
if (!data.token) {
2426
// If the token is not set, then display an error

js/ros2-design.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ $( document ).ready(function() {
8686
' <h3 class="panel-title">Error</h3>',
8787
' </div>',
8888
' <div class="panel-body">',
89-
' Error retrieving Github Info: ' + err,
89+
' Error retrieving Github Info: <br/>',
90+
' [' + err.request.status + '] ' +
91+
err.request.statusText + '<br/>',
92+
' ' + err.request.response,
9093
' </div>',
9194
'</div>'].join('\n'));
9295
} else {
@@ -159,7 +162,7 @@ $( document ).ready(function() {
159162
// Define function for handling a single issue
160163
var check_issue = function(prs_in, index) {
161164
// If index >= the length of the issues originally given, exit
162-
if (index >= prs_in.length) {
165+
if (!prs_in || index >= prs_in.length) {
163166
return;
164167
}
165168
// Else grab the current issue

0 commit comments

Comments
 (0)