Fixed bug where deleting a device doesn't work if device ID contains URL encoded characters.

This commit is contained in:
Zaid Abdulla committed 2014-08-18 22:23:46 +03:00
1 parent b3ef66a581
commit 7d3618a480
1 file changed
+1 -1
+1 -1
View File
@@ -316,7 +316,7 @@ listener = (request, response) ->
response.end('405 Method Not Allowed') response.end('405 Method Not Allowed')
return return
deviceId = DELETE_DEVICE_REGEX.exec(urlParts.pathname)[1] deviceId = querystring.unescape(DELETE_DEVICE_REGEX.exec(urlParts.pathname)[1])
apiFunctions.deleteDevice(deviceId, (err) -> apiFunctions.deleteDevice(deviceId, (err) ->
if err if err
response.writeHead(500) response.writeHead(500)