From b88bc8a023cffe688a94d0aca10dbef44c3ae42a Mon Sep 17 00:00:00 2001 From: Guillaume ARM Date: Wed, 22 May 2024 21:07:13 +0200 Subject: [PATCH] fix(inferium)!: rename getconfig in get-config --- inferium-harvester.lua | 4 ++-- inferium-server.lua | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/inferium-harvester.lua b/inferium-harvester.lua index 0d21c7d..d84f625 100644 --- a/inferium-harvester.lua +++ b/inferium-harvester.lua @@ -2,7 +2,7 @@ local net = require('libs/net') local utils = require('libs/utils') local turtleUtils = require('libs/turtle-utils') -local VERSION = "3.1.0" +local VERSION = "4.0.0" local INFERIUM_SERVER = 'inferium.com' local IDLE_TIME = 2 local WAIT_ITEM_IDLE_TIME = 5 @@ -321,7 +321,7 @@ end local function fetchRemoteConfig() print('> fetch remote config') - local message = { type = 'getconfig' } + local message = { type = 'get-config' } local lastErrMessage = nil diff --git a/inferium-server.lua b/inferium-server.lua index a91c8f5..d6cb466 100644 --- a/inferium-server.lua +++ b/inferium-server.lua @@ -3,7 +3,7 @@ local utils = require('libs/utils') local inferium = require('config/inferium') local DEFAULT_HARVESTER_NAME = 'harvester' -local VERSION = "1.2.0" +local VERSION = "2.0.0" local INFERIUM_SERVER = 'inferium.com' local PERSISTED_CONFIGS = '/data/inferium-configs' @@ -78,7 +78,7 @@ end local function getConfig(_, computerId) if not computerId == nil then - print('getconfig error: no computerId found') + print('get-config error: no computerId found') return nil end @@ -91,7 +91,7 @@ local function getConfig(_, computerId) end return { - type = "getconfig/response", + type = "get-config/response", payload = getConfigWithLength(config) } end @@ -133,8 +133,8 @@ local function upgradeServer() end local ROUTES = { - ['getconfig'] = getConfig, - ['setconfig'] = setConfig, + ['get-config'] = getConfig, + ['set-config'] = setConfig, ['list-harvesters'] = listHarvesters, ['exit-server'] = exitServer, ['upgrade-server'] = upgradeServer,