isDomainUsedElsewhere

Function

Check to see if a domain is in use by any site other than the one passed in. This is used in various validators while the user is editing properties of the site.

  • isDomainUsedElsewhere(hostname: string, siteId: string, hubRequestOptions: IHubRequestOptions) : Promise<boolean>

Parameters

Parameter Type Default Notes
hostname Required string

to check

siteId Required string

Site Id we are checking for

hubRequestOptions Required IHubRequestOptions

Returns

Promise<boolean>

Function defined in common/src/sites/domains/is-domain-used-elsewhere.ts:12