fix sql to also match subdomain
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
Some checks failed
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/test Pipeline failed
This commit is contained in:
parent
b3e01fcd6a
commit
c97c29ad0f
1 changed files with 2 additions and 1 deletions
|
@ -29,8 +29,9 @@ export async function shouldBlockInstance(host: Instance['host']): Promise<boole
|
|||
return true;
|
||||
}
|
||||
|
||||
const result: { exists: boolean } = await db.query('SELECT EXISTS(SELECT "host" FROM instance WHERE "host" = $1 AND "isSuspended") AS "exists"', [
|
||||
const result: { exists: boolean } = await db.query('SELECT EXISTS(SELECT "host" FROM instance WHERE ("host" = $1 OR "host" LIKE $2) AND "isSuspended") AS "exists"', [
|
||||
host,
|
||||
'%.' + host,
|
||||
]);
|
||||
return result.exists;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue