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