Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git] / shared / get-org-name-from-uri.js
blob0e7977310bf7ad91051286a22694d8895d080d8f
1 'use strict';
3 var getOrgNameFromTroupeName = require('./get-org-name-from-troupe-name');
5 /**
6 * @deprecated
7 */
8 module.exports = function getOrgNameFromUri(uri) {
9 //We do have the url /orgs/:orgName/rooms which we have to account for
10 if (/^orgs/.test(uri)) {
11 return uri.split('/')[1];
13 return getOrgNameFromTroupeName(uri);