Skip to content

Commit dbfc906

Browse files
authored
Merge pull request #55 from carlosarraes/patch-1
docs: fix state example from db to redis
2 parents b0dc21a + 730e006 commit dbfc906

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/patterns/dependency-injection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ const authen = (app: Elysia) => app
4747
.post('/sign-in', signIn)
4848
.post('/sign-up', signUp)
4949
// But then there is no type
50-
.post('/sign-out', ({ signOut, store: { db } }) => {
50+
.post('/sign-out', ({ signOut, store: { redis } }) => {
5151
signOut()
5252

53-
db.doSomething()
53+
redis.doSomething()
5454
})
5555
```
5656

@@ -82,10 +82,10 @@ const authen = (app: Elysia) => app
8282
.post('/sign-in', signIn)
8383
.post('/sign-up', signUp)
8484
// Now it's strictly typed
85-
.post('/sign-out', ({ signOut, store: { db } }) => {
85+
.post('/sign-out', ({ signOut, store: { redis } }) => {
8686
signOut()
8787

88-
db.doSomething()
88+
redis.doSomething()
8989
})
9090
```
9191

0 commit comments

Comments
 (0)