[MM-52587] Clean up URL utils, use isInternalURL when possible (#2702)

This commit is contained in:
Devin Binnie
2023-05-03 08:48:41 -04:00
committed by GitHub
parent f3a4417464
commit e227c6bf1d
30 changed files with 481 additions and 634 deletions

View File

@@ -5,7 +5,7 @@ import {v4 as uuid} from 'uuid';
import {MattermostTeam, Team} from 'types/config';
import urlUtils from 'common/utils/url';
import {parseURL} from 'common/utils/url';
export class MattermostServer {
id: string;
@@ -23,7 +23,7 @@ export class MattermostServer {
}
updateURL = (url: string) => {
this.url = urlUtils.parseURL(url)!;
this.url = parseURL(url)!;
if (!this.url) {
throw new Error('Invalid url for creating a server');
}