Skip to content

Commit

Permalink
chore(local): change legacy using to inject (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipraty authored Mar 26, 2024
1 parent caacef9 commit a96b481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/local/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LocalImageSource extends ImageSource<LocalImageSource.Config> {
this.logger = ctx.logger('booru-local')

if (config.storage === 'database') {
ctx.using(['database'], async (ctx) => {
ctx.inject(['database'], async (ctx) => {
ctx.model.extend(
'booru_local',
{
Expand Down Expand Up @@ -78,7 +78,7 @@ class LocalImageSource extends ImageSource<LocalImageSource.Config> {
}

// TODO: cache storage
if (config.storage === 'cache') ctx.using(['cache'], () => {})
if (config.storage === 'cache') ctx.inject(['cache'], () => {})

ctx.on(
'ready',
Expand Down

0 comments on commit a96b481

Please sign in to comment.