Skip to content

Commit 0d8f673

Browse files
authored
docs: fix mention of @UseRequestContext
Replaced the old "@UseRequestContext" decorator for the new "@CreateRequestContext"
1 parent f1ba6ec commit 0d8f673

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ But middlewares are executed only for regular HTTP request handles, what if we n
178178
a request scoped method outside of that? One example of that is queue handlers or
179179
scheduled tasks.
180180

181-
We can use the `@UseRequestContext()` decorator. It requires you to first inject the
181+
We can use the `@CreateRequestContext()` decorator. It requires you to first inject the
182182
`MikroORM` instance to current context, it will be then used to create the context
183183
for you. Under the hood, the decorator will register new request context for your
184184
method and execute it inside the context.
@@ -189,7 +189,7 @@ export class MyService {
189189

190190
constructor(private readonly orm: MikroORM) { }
191191

192-
@UseRequestContext()
192+
@CreateRequestContext()
193193
async doSomething() {
194194
// this will be executed in a separate context
195195
}

0 commit comments

Comments
 (0)