From 9c21397dab713081755a6eb71242ac6ef240a127 Mon Sep 17 00:00:00 2001 From: Jonah Stiennon Date: Wed, 9 Jul 2014 15:15:43 -0700 Subject: [PATCH] a couple random routes didn't have :sessionId as optional --- lib/server/routing.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/server/routing.js b/lib/server/routing.js index 9b9bf6bbc..70ca56376 100644 --- a/lib/server/routing.js +++ b/lib/server/routing.js @@ -44,9 +44,9 @@ module.exports = function (appium) { rest.post('/wd/hub/session/:sessionId?/dismiss_alert', controller.postDismissAlert); rest.post('/wd/hub/session/:sessionId?/timeouts/implicit_wait', controller.implicitWait); rest.post('/wd/hub/session/:sessionId?/timeouts/async_script', controller.asyncScriptTimeout); - rest.get('/wd/hub/session/:sessionId/orientation', controller.getOrientation); - rest.post('/wd/hub/session/:sessionId/orientation', controller.setOrientation); - rest.get('/wd/hub/session/:sessionId/screenshot', controller.getScreenshot); + rest.get('/wd/hub/session/:sessionId?/orientation', controller.getOrientation); + rest.post('/wd/hub/session/:sessionId?/orientation', controller.setOrientation); + rest.get('/wd/hub/session/:sessionId?/screenshot', controller.getScreenshot); rest.post('/wd/hub/session/:sessionId?/element/:elementId?/element', controller.findElementFromElement); rest.post('/wd/hub/session/:sessionId?/element/:elementId?/elements', controller.findElementsFromElement); rest.post('/wd/hub/session/:sessionId?/touch/click', controller.doClick); @@ -54,7 +54,7 @@ module.exports = function (appium) { rest.post('/wd/hub/session/:sessionId?/touch/down', controller.touchDown); rest.post('/wd/hub/session/:sessionId?/touch/up', controller.touchUp); rest.post('/wd/hub/session/:sessionId?/touch/move', controller.touchMove); - rest.post('/wd/hub/session/:sessionId/touch/flick', controller.pickAFlickMethod); + rest.post('/wd/hub/session/:sessionId?/touch/flick', controller.pickAFlickMethod); rest.post('/wd/hub/session/:sessionId?/url', controller.postUrl); rest.get('/wd/hub/session/:sessionId?/url', controller.getUrl); rest.post('/wd/hub/session/:sessionId?/element/active', controller.active);