Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/373435 )

Change subject: Fix the issue of no adaptation if MT provider is not specified
......................................................................

Fix the issue of no adaptation if MT provider is not specified

Adaptation should proceed if no MT provider is specificed. It should
fail if provider is given, but fails the validation against the
language pair and authentication token.

Change-Id: Iad82cd4e9da4e06db1f31a98fd9fac140342529b
---
M lib/routes/v1.js
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/35/373435/1

diff --git a/lib/routes/v1.js b/lib/routes/v1.js
index 6a43dfc..2f561d6 100644
--- a/lib/routes/v1.js
+++ b/lib/routes/v1.js
@@ -234,7 +234,13 @@
                from = req.params.from,
                to = req.params.to;
 
-       mtClient = getMTClient( req, res );
+       if ( req.params.provider ) {
+               mtClient = getMTClient( req, res );
+               if ( !mtClient ) {
+                       // With explicit provider, if not MT Client found, it 
is an error.
+                       return;
+               }
+       }
 
        sourceHtml = req.body.html;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/373435
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad82cd4e9da4e06db1f31a98fd9fac140342529b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to