fix(inferium)!: rename getconfig in get-config

This commit is contained in:
Guillaume ARM 2024-05-22 21:07:13 +02:00
parent 49669c6e59
commit b88bc8a023
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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,