Skip to content

Commit

Permalink
Add version to the alive service
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyben committed Mar 30, 2020
1 parent 915beae commit 72be456
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/services/alive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ const Axios = require('axios');

let AliveService = function () { }

AliveService.prototype.postImalive = async function () {
AliveService.prototype.postImalive = async function (version) {
try {
await Axios({
url: `https://whoisalive.azurewebsites.net/imalive`,
method: 'post',
data: {
application: 'csgo-mm-server-picker'
application: 'csgo-mm-server-picker',
version: version
}
});
} catch (error) { } // Do nothing
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function getUpdate() {

function imAlive() {
try {
new AliveService().postImalive();
new AliveService().postImalive(app.getVersion());
} catch (error) {
log.error(error.stack);
}
Expand Down

1 comment on commit 72be456

@BaybOo01
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to update the app ??

Please sign in to comment.