use correct types for sameOrSubdomainOf
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
Norm 2022-12-01 02:46:51 -05:00
parent 0f709026b1
commit b3e01fcd6a
Signed by: norm
GPG key ID: 7123E30E441E80DE

View file

@ -13,7 +13,7 @@ const deadThreshold = 7 * DAY;
* @param blockedHost punycoded instance host that is blocked
* @returns whether host and blockedHost is the same or if host is a subdomain of blockedHost
*/
function sameOrSubdomainOf(host: string, blockedHost: string): boolean {
function sameOrSubdomainOf(host: Instance['host'], blockedHost: Instance['host']): boolean {
return host === blockedHost || host.endsWith('.' + blockedHost);
}