Rename "uri" endpoint configuration parameter to "path"
This commit is contained in:
@@ -71,7 +71,7 @@ class EndpointLoader(
|
|||||||
consumer = parseConsumer(luaTable)
|
consumer = parseConsumer(luaTable)
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun parseUri(luaTable: LuaTable) = luaTable.get("uri").checkjstring()
|
private fun parseUri(luaTable: LuaTable) = luaTable.get("path").checkjstring()
|
||||||
.let { UriTemplate.parse(it) }
|
.let { UriTemplate.parse(it) }
|
||||||
|
|
||||||
private fun parseConsumer(luaTable: LuaTable) = luaTable.get("consumer").checkclosure()
|
private fun parseConsumer(luaTable: LuaTable) = luaTable.get("consumer").checkclosure()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
uri = "/cache/{filename}.{ext}",
|
path = "/cache/{filename}.{ext}",
|
||||||
method = Method.GET,
|
method = Method.GET,
|
||||||
consumer = function(request)
|
consumer = function(request)
|
||||||
local filename = string.format("%s.%s", request.path.filename, request.path.ext)
|
local filename = string.format("%s.%s", request.path.filename, request.path.ext)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
uri = "/tts.{ext}",
|
path = "/tts.{ext}",
|
||||||
method = Method.GET,
|
method = Method.GET,
|
||||||
consumer = function(request)
|
consumer = function(request)
|
||||||
local format = (request.path.ext or "wav"):upper()
|
local format = (request.path.ext or "wav"):upper()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
uri = "/say",
|
path = "/say",
|
||||||
method = Method.POST,
|
method = Method.POST,
|
||||||
queued = true,
|
queued = true,
|
||||||
accepts = Mime.JSON,
|
accepts = Mime.JSON,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function restoreSnapshotIfLast(queueLength)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uri = "/sonos",
|
path = "/sonos",
|
||||||
method = Method.POST,
|
method = Method.POST,
|
||||||
accepts = Mime.JSON,
|
accepts = Mime.JSON,
|
||||||
queued = true,
|
queued = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user