mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 19:32:26 +00:00
Refactor echo functionality: add new echo implementation, remove deprecated echo?b1 file, and update preparation script
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
package.path = "./com/?.lua;" .. package.path
|
||||||
|
|
||||||
print = function() end
|
print = function() end
|
||||||
io.write = function(...) end
|
io.write = function(...) end
|
||||||
io.stdout = function() return nil end
|
io.stdout = function() return nil end
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
--- #description = "Echoes back the message provided in the 'msg' parameter."
|
--- #description = "Echoes back the message provided in the 'msg' parameter."
|
||||||
|
|
||||||
|
local mod = require("_for_echo")
|
||||||
|
|
||||||
if not Params.msg then
|
if not Params.msg then
|
||||||
Result.status = "error"
|
Result.status = "error"
|
||||||
Result.error = "Missing parameter: msg"
|
Result.error = "Missing parameter: msg"
|
||||||
@@ -7,5 +9,5 @@ if not Params.msg then
|
|||||||
end
|
end
|
||||||
|
|
||||||
Result.status = "ok"
|
Result.status = "ok"
|
||||||
Result.answer = Params.msg
|
Result.answer = mod.translate(Params.msg)
|
||||||
return
|
return
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
--- #description = "Echoes back the message provided in the 'msg' parameter. b1"
|
|
||||||
|
|
||||||
if not Params.msg then
|
|
||||||
Result.status = "error"
|
|
||||||
Result.error = "Missing parameter: msg"
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
Result.status = "okv2"
|
|
||||||
Result.answer = Params.msg
|
|
||||||
return
|
|
||||||
Reference in New Issue
Block a user