From acdc509630d5182f9f3d224b259e2a46000b1f27 Mon Sep 17 00:00:00 2001 From: hailey Date: Tue, 2 Sep 2025 13:36:20 -0700 Subject: safelink (#8917) Co-authored-by: hailey Co-authored-by: Stanislas Signoud Co-authored-by: will berry Co-authored-by: BlueSkiesAndGreenPastures Co-authored-by: Chenyu Huang --- bskylink/src/context.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bskylink/src/context.ts') diff --git a/bskylink/src/context.ts b/bskylink/src/context.ts index 7e6f2f34e..1520513ce 100644 --- a/bskylink/src/context.ts +++ b/bskylink/src/context.ts @@ -1,4 +1,5 @@ -import {Config} from './config.js' +import {SafelinkClient} from './cache/safelinkClient.js' +import {type Config} from './config.js' import Database from './db/index.js' export type AppContextOptions = { @@ -9,11 +10,16 @@ export type AppContextOptions = { export class AppContext { cfg: Config db: Database + safelinkClient: SafelinkClient abortController = new AbortController() constructor(private opts: AppContextOptions) { this.cfg = this.opts.cfg this.db = this.opts.db + this.safelinkClient = new SafelinkClient({ + cfg: this.opts.cfg.service, + db: this.opts.db, + }) } static async fromConfig(cfg: Config, overrides?: Partial) { -- cgit 1.4.1