[MM-52587] Clean up URL utils, use isInternalURL when possible (#2702)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
Reference in New Issue
Block a user