Skip to content

Commit

Permalink
fix: pass application instance to the RedisManager class constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 13, 2020
1 parent 26b19d2 commit 5e73968
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion npm-audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h5 class="card-title">
<div class="card">
<div class="card-body">
<h5 class="card-title">
October 13th 2020, 9:16:50 am
October 13th 2020, 9:58:26 am
</h5>
<p class="card-text">Last updated</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion providers/RedisProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class RedisProvider {
const emitter = this.app.container.use('Adonis/Core/Event')
const { RedisManager } = require('../src/RedisManager')

return new RedisManager(this.app.container, config, emitter)
return new RedisManager(this.app, config, emitter)
})
}

Expand Down
1 change: 1 addition & 0 deletions test/redis-provider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ test.group('Redis Provider', (group) => {
})

assert.instanceOf(app.container.use('Adonis/Addons/Redis'), RedisManager)
assert.deepEqual(app.container.use('Adonis/Addons/Redis')['application'], app)
assert.deepEqual(
app.container.use('Adonis/Addons/Redis'),
app.container.use('Adonis/Addons/Redis')
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"importHelpers": true,
"types": ["@adonisjs/core", "@adonisjs/repl", "@types/node"]
}
}

0 comments on commit 5e73968

Please sign in to comment.