Skip to content

Commit

Permalink
Fixed double declaration. Added server down message
Browse files Browse the repository at this point in the history
  • Loading branch information
jo32pilot committed Jul 18, 2019
1 parent 32895eb commit 199aa72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/SQLQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ function updateGraphTable(channelId, times){
`${today.getMonth() + 1}/${today.getDate()}/`
+ `${today.getFullYear()}`);

let channelId = sql.raw(channelId + _GRAPH_SUFFIX);
channelId = sql.raw(channelId + _GRAPH_SUFFIX);

pool.getConnection(function(err, connection){

Expand Down
7 changes: 7 additions & 0 deletions frontend/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,13 @@ function _createRequest(path, callback, additionalArgs={}){
url: SERVER_DOMAIN + path,
type: "GET",
headers: reqHeaders,
error: function(jqXHR){
if(jqXHR["status"] == 0){
$("#leaderboard").html("<p>Server is possibly down.<br>"
+ "Please report "
+ "this to [email protected]<br> Thank you!</p>");
}
}
};

// If callback exists, attach it.
Expand Down

0 comments on commit 199aa72

Please sign in to comment.