mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: ♻️ Don't use Bun global
This commit is contained in:
parent
d55668d529
commit
25ea870f71
15 changed files with 32 additions and 19 deletions
|
|
@ -18,6 +18,7 @@ import type {
|
|||
import { Instance, Like, Note, Relationship, User } from "@versia/kit/db";
|
||||
import { Likes, Notes } from "@versia/kit/tables";
|
||||
import type { SocketAddress } from "bun";
|
||||
import { Glob } from "bun";
|
||||
import chalk from "chalk";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { matches } from "ip-matching";
|
||||
|
|
@ -31,7 +32,7 @@ import { ApiError } from "../errors/api-error.ts";
|
|||
* @returns {boolean} - True if defederated, false otherwise.
|
||||
*/
|
||||
function isDefederated(hostname: string): boolean {
|
||||
const pattern = new Bun.Glob(hostname);
|
||||
const pattern = new Glob(hostname);
|
||||
|
||||
return (
|
||||
config.federation.blocked.find(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue