From 72be4565840b66bf709311dba48bbcbed483715c Mon Sep 17 00:00:00 2001 From: Jyben Date: Mon, 30 Mar 2020 13:28:14 +0200 Subject: [PATCH] Add version to the alive service --- app/services/alive.js | 5 +++-- main.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/services/alive.js b/app/services/alive.js index 12236a3..665566c 100644 --- a/app/services/alive.js +++ b/app/services/alive.js @@ -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 diff --git a/main.js b/main.js index 76412eb..ef256f5 100644 --- a/main.js +++ b/main.js @@ -90,7 +90,7 @@ function getUpdate() { function imAlive() { try { - new AliveService().postImalive(); + new AliveService().postImalive(app.getVersion()); } catch (error) { log.error(error.stack); }