Rename "uri" endpoint configuration parameter to "path"

This commit is contained in:
2020-07-07 21:53:17 +02:00
parent 5f1e5b982d
commit b2f3f74237
5 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
return {
uri = "/say",
path = "/say",
method = Method.POST,
queued = true,
accepts = Mime.JSON,

View File

@@ -30,7 +30,7 @@ function restoreSnapshotIfLast(queueLength)
end
return {
uri = "/sonos",
path = "/sonos",
method = Method.POST,
accepts = Mime.JSON,
queued = true,