mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 15:12:26 +00:00
you can get a description if you send a request where in params there is a field about with any content
22 lines
367 B
Lua
22 lines
367 B
Lua
if In.Params and In.Params.about then
|
|
Out.Result = {
|
|
description = "Echo of the message",
|
|
params = {
|
|
msg = "just message"
|
|
}
|
|
}
|
|
return
|
|
end
|
|
|
|
local function validate()
|
|
if not In.Params.msg or In.Params.msg == "" then
|
|
Out.Error = {
|
|
message = "there must be a msg parameter"
|
|
}
|
|
return
|
|
end
|
|
end
|
|
|
|
|
|
validate()
|
|
Out.Result.answer = In.Params.msg |