diff --git a/lib/server/routing.js b/lib/server/routing.js index 9b9bf6bbcaa..70ca563767b 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);