Поправил рассчет доменов

master
Sipachev Igor 3 years ago
parent 77408cdb73
commit b89b96ebbe
  1. 7
      popup/src/api/DomainResolver.ts

@ -20,11 +20,14 @@ export class DomainResolver {
url.indexOf('placetgroup') > -1 url.indexOf('placetgroup') > -1
const project = isPlacetgroup ? 'placetgroup' : 'nordecum' const project = isPlacetgroup ? 'placetgroup' : 'nordecum'
const domain = isPlacetgroup ? 'com' : 'lt' const domain = isPlacetgroup ? 'com' : 'lt'
if (nickname && url.indexOf('.sv') > -1) { const isLocal = url.indexOf('.sv') !== -1
if (nickname && isLocal) {
url = project + '.' + nickname + '.sv' url = project + '.' + nickname + '.sv'
} else { } else {
url = project + '.' + nickname + '.' + domain url = 'dev.' + project + '.' + domain
} }
url = (isLocal ? 'http://' : 'https://') + url
console.log('domain_resolver', parts, nickname, isPlacetgroup, project, domain, url)
resolve(url) resolve(url)
return return
} }

Loading…
Cancel
Save