From 68408b7cd3dcc1f6a163e6e5b7c3dc29782b0c8e Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sat, 22 Aug 2020 01:29:47 +0900 Subject: [PATCH] Update --- app/store/agents.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/store/agents.js b/app/store/agents.js index 5b612d8..2685c8b 100644 --- a/app/store/agents.js +++ b/app/store/agents.js @@ -3,10 +3,12 @@ const moment = require('moment') const Agents = () => { const obj = {} obj.agents = [] + obj._agentId = 0 obj.addAgent = (os, ip, profile, interval) => { const agent = {} - agent.id = obj.agents.length + 1 + obj._agentId += 1 + agent.id = obj._agentId agent.os = os agent.ip = ip agent.profile = profile